Blackout for SOPA and PIPA.
Click to learn more
Posterous theme by Cory Watilo

Filed under: General

We're not superheroes - Invisible to the eye

Media_https3amazonaws_pncho
We're not superheroes I was reading bits of Coders at work, a book of interviews to famous programmers. I didn't like it very much: here's why. The first thing I noticed is that many questions are biographical. I do not care about knowing if Ken Thompson, which built Unix, worked on a PDP-10 or a PDP-11 or a PDP-7. By the way, I do not even know how those things look like: I was born in 1988. Besides that, this kind of books tells you how to live like a superhero coder, but most of us just aren't (me too). Thompson could work out the design of software in his mind for a month before starting coding, I can't (or I can waste less time by writing something in code). Knuth could design and code LaTeX in pencil and write for six months before do any testing. I can't (or I can, but I would be much more efficient with a quick feedback loop like Test-Driven Development's one.) Zawinski could pick up rolls of duct tape and make Netscape work in six months (picking up also a lot of technical debt and vanishing from the market in the following years). I prefer working software over comprehensive documentation but not over sustainable development. So we're not superheroes: test suites, source control, Continuos Integration are our bat-gadgets which enable us to deliver software while working for a living and not living for work, like Ken Thompson and his 28-hour days or Bill Gates and his nights at school programming. Let the people with the superpowers shoot webs all night long, while we go back to Wayne Manor and throw a party. At least Batman hasn't a day job: poor's Peter Parker must live a miserable life. Published by Giorgio via We're not superheroes - Invisible to the eye.

Show Your GIT Branch Name In Your Prompt

Media_https3amazonaws_hvyjm

Show Your GIT Branch Name In Your Prompt

Typing git branch over and over to see what branch you are on sucks. Sure, you could argue that you should always KNOW what branch you’re currently working on. And if you did, you would obviously not be a git user. Bouncing around branches can be pretty common, and I know I’ve messed some things up pretty bad not knowing what branch I was on. So set up your shell to always put the name of the current branch into your prompt. [cc lang="bash" escaped="yes" lines="27"] function parse_git_branch { git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' } function proml { local BLUE="\[\033[0;34m\]" local RED="\[\033[0;31m\]" local LIGHT_RED="\[\033[1;31m\]" local GREEN="\[\033[0;32m\]" local LIGHT_GREEN="\[\033[1;32m\]" local WHITE="\[\033[1;37m\]" local LIGHT_GRAY="\[\033[0;37m\]" case $TERM in xterm*) TITLEBAR=&'\[\033]0;\u@\h:\w\007\]&' ;; *) TITLEBAR="" ;; esac PS1="${TITLEBAR}\ $BLUE[$RED\$(date +%H:%M)$BLUE]\ $BLUE[$RED\u@\h:\w$GREEN\$(parse_git_branch)$BLUE]\ $GREEN\$ " PS2=&'> &' PS4=&'+ &' } proml [/cc] Pastie Link Put this at the top of your .bash_profile and you’ll be pimping your branch all over. Thanks to @defunkt for this. via Show Your GIT Branch Name In Your Prompt.
I thank @fqqkd for this, He pointed me to the post. Though I didn't like the colors, so I've made blue [cc lang="bash" inline="yes"]BLUE="\[\033[0;36m\]"[/cc] and the propt: [cc lang="bash" escpaed="yes"] PS1="${TITLEBAR}\ $BLUE[$RED\$(date +%H:%M)$BLUE]\ $BLUE[$BLUE\u@\h:\w$GREEN\$(parse_git_branch)$BLUE]\ $BLUE\$ " [/cc]

Just read: Pro Git

Media_https3amazonaws_efbvp

Product Details

  • Paperback: 288 pages
  • Publisher: Apress; XXII, 265 p. edition (August 27, 2009)
  • Language: English
  • ISBN-10: 1430218339
  • ISBN-13: 978-1430218333
  • Product Dimensions: 9.1 x 7 x 0.9 inches
  • Shipping Weight: 14.9 ounces
Just read myself through Scott Chacon's Pro Git book. Had an unexpectedly fine time, while getting closer to the version control system that I'll be using in the future. Since finishing the book, I've started migrating all my running projects to git, and I must admit: I love it. So much easier, so convenient, so secure. I will write more about my adventures with Git later. For now I recommend everyone to read the book. It's free to do so online at: http://progit.org/book/. Though it is here, I suggest you put this relatively cheap book on your bookshelf, to be at hand when in need. (amazon)

Editorial Reviews

Product Description

Git is the version control system developed by Linus Torvalds for Linux kernel development. It took the open source world by storm since its inception in 2005, and is used by small development shops and giants like Google, Red Hat, and IBM, and of course many open source projects.
  • A book by Git experts to turn you into a Git expert
  • Introduces the world of distributed version control
  • Shows how to build a Git development workflow

What you’ll learn

  • Use Git as a programmer or a project leader.
  • Become a fluent Git user.
  • Use distributed features of Git to the full.
  • Acquire the ability to insert Git in the development workflow.
  • Migrate programming projects from other SCMs to Git.
  • Learn how to extend Git.

Who is this book for?

This book is for all open source developers: you are bound to encounter it somewhere in the course of your working life. Proprietary software developers will appreciate Git’s enormous scalability, since it is used for the Linux project, which comprises thousands of developers and testers.

About the Apress Pro Series

The Apress Pro series books are practical, professional tutorials to keep you on and moving up the professional ladder. You have gotten the job, now you need to hone your skills in these tough competitive times. The Apress Pro series expands your skills and expertise in exactly the areas you need. Master the content of a Pro book, and you will always be able to get the job done in a professional development project. Written by experts in their field, Pro series books from Apress give you the hard–won solutions to problems you will face in your professional programming career.

Dropbox - If you've lost your hdd space

Media_https3amazonaws_gzpcb
I came home the other day, and had my computer notifying me about less then 2GB free space left. I fiddled a bit round with my data, deleted cache, sources, downloaded archives, etc. All went fine, had about 7GB left. Closed the lid, went to sleep and work. I got home today, and the same message waited for me on the screen again. I did a deeper folder size analysis, and found the truth. DROPBOX (2Gb package) CACHE was 15GB! In my home folder was a
.dropbox/cache
directory, which had several YYYY-MM-DD formatted entries. I deleted all, but the last 2 dates, and freed 10Gb's. If anyone finds a good way to prevent this hog, please leave a comment.