VISUAL_STUDIO_R.I.P._1989-2014

Visual Studio started CLOSING on me as I was editing due to my apparent change in status at some far-flung location for which I have no control. If Microsoft thinks that’s a feature I want in my primary development tool… well, all I have to say is, never again will I rely on it. Eclipse is a decent IDE and I’ll be converting my muscle memory to its ways after a couple decades of baking Visual Studio into my hands. It may be painful but it is also long overdue.

  1. Install Eclipse
    1. I went for the PHP version (“PDT”) since it seemed to have a few bells and whistles (eg git)
    2. The C++ support in Eclipse is called “CDT” and  you can install it by adding this “Work with” repo: http://download.eclipse.org/tools/cdt/releases/kepler
    3. I installed “CDT Main Features”, plus optional Memory View Enhancements, Misc Utils, Multicore Visualizer, Qt support, (ironically) Visual C++ support, and Visualizer Framework.  Not sure about these, time will tell.
  2. Configure Eclipse
    1. The biggest startup challenge is setting up key shortcuts.  The default ones are pretty stupid if you’ve used Microsoft products.  The main thing to remember is that you have to search for existing shortcut keys and manually remove them before you can add a new one, otherwise you will just get conflicts and nothing will work.  This sucks shit but not too bad once you realize what is going on.
    2. Set UTF-8 encoding:
      Windows > Preferences > General > Content Types, set UTF-8 as the default encoding for all content types.
      Windows > Preferences > General > Workspace, set "Text file encoding" to "Other : UTF-8".
  3. Set up projects
    1. Open C++ perspective
    2. Right-click project pane, New…, Blank Makefile, Other toolchain, use existing codebase location for workspace
    3. Search…, Working set, Choose, New, Resource, Name = codebase, click on existing codebase location, OK

More to come as I work with it. I’m moving the notes to the wiki.

I’m a cross-platform developer, with about 17 different development environments. Most projects have a remote central team repository. git lets me cast my code out to all my local locations and effortlessly remained synced with the team repo. In addition, I can work exclusively in my local repos, as long as I need to, without touching the team repo until I’m ready to push my stuff to it. I’ve refined my process down to just the right number of branches to accomplish this. Here’s my git bliss:

First, set up a local centralized repo:

ssh me@my-central-repo-server
git clone ssh://me@the-team-repo/big-project
cd big-project
git branch daily_grind # create working branch but do NOT check it out

Next, set up a [git merge-to] command (huge THANKS to this gist):

emacs .git/config
  [alias]
    merge-to = "!gitmergeto() { export tmp_branch=`git branch | grep '* ' | tr -d '* '` && git checkout $1 && git merge $tmp_branch && git checkout $tmp_branch; unset tmp_branch; }; gitmergeto"

Now we can set up a clone in many new locations – repeat this on each dev box:

ssh me@my-laptop
git clone ssh://me@my-central-repo-server/big-project
cd big-project
git checkout -b daily_grind origin/daily_grind

This location is now a work site. Work in the daily_grind branch. Always pull before you get started working, and push when done:

ssh me@my-laptop
git pull
# work work work!
git commit -a
git push

When you are ready to share with the team, all your commits from all your dev locations will be in your central repo, in the daily_grind branch. Just merge your work with the team’s:

ssh me@my-central-repo-server
git pull # to get the team's latest
git merge daily_grind # to merge in your latest
# resolve any conflicts
git push # to push your changes to the team
git merge-to daily_grind # to push team changes to your work repo

If there were any team changes, you’ll get them in your local repos the next time you pull.

And away we go.

here are all the confusing mostly-incomplete zip file solutions:

  • zlib THE lib; only does ONE file, knows nothing about .zip containers; gz uses zlib, works on ONE file (the tar file, hence .tar.gz)
  • miniz some google code HACKERY that does exactly what i want (.zip handling in one header file) but DOES NOT WORK – erp, yes it does, id10t
  • minizip a zlib-bundled addon package that allows for working with .zip files
  • boost you can bake zlib into boost but again, it knows nothing about .zip files, MOTHER FRACK
  • libzip ANOTHER library, supposedly handles .zip files – REQUIRES ZLIB DOH, might as well use minizip

In the end, miniz made it pretty easy (once I used it correctly). Remember, a .zip file is a container of compressed files, doh.

That was fun! :-)

I always seem to forget how to fade the edge of an image in the gimp… so here’s a note-to-self:

      select the area to preserve; IF YOU WANT THE EDGE TO FADEOUT, SELECT A BOX JUST INSIDE THE ENTIRE IMAGE; YOU CAN ALSO USE THE MAGIC WAND TO SELECT AN AREA, AND SHRINK AND GROW AS NEEDED
      SELECT->FEATHER, GIVE IT ABOUT 5 PIXELS; THIS APPEARS TO DO NOTHING BUT PUT A BIT OF ROUNDED CORNERS ON YOUR SELECTION, WEIRD EH?
      NOW, INVERT THE SELECTION, AND HIT DELETE – vioala, GIMP FADES OUTWARD. YEs, IT’s weird!

soRRY ABOUT THE caps, IT’S HONESTLY EXACTLY how the letters are spewing out on my macbOok prO, Now That i”ve Mananged to get it humming and then spill a full glass of water on it. AWESOmENEsS. AND that”s With another Keyboard attacheD. aPPARENTLY THE MAIN KEyboard is flicking THe shift KEy on aND OFF LIKE A CHRISTmAS TrEE. AND IT’S not EVen ThaNKSGIving Yet.

This problem turned out to be due to the very long relative paths that Visual Studio created to the gsoap-generated files. (continued…)