software
Six Resources To Study And Master Git Source Control
It’s no secret that Git, as a source code control tool, has become quite popular in 2008, in part boosted by the success of the socially oriented github.com Here is a list of six resources that will help you get more comfy with Git, whatever your current knowledge of the tool. Let me know if you think that, after reading these six documents, you can still point to a few stones left unturned.
3 Reasons To Switch To Git From Subversion
A to-the-point document, created by Mark McBride, that covers several scenarios and for each scenario, shows how Git could make your life easier if you are not using it yet.
My Git Cheatsheet
A concise guide for the absolute beginner who wants to hit the ground running. Go through the exercises and you will end up with a pretty good picture of what Git can do.
Everyday GIT With 20 Commands Or So
A quick cheat sheet: start with the section corresponding to your role (individual developer, contributor, integrator…) You will not learn a lot about Git’s philosophy, but you will certainly get the job done.
Git Magic
Ben Lynn wrote a whole book covering not just cloning and branching but also some precious recipes: What to do when something goes wrong? What if my commit is too big? Remote access magic, history digging…Even Git’s shortcomings and their workarounds are covered.
Git from the bottom up
John Wiegley makes a convincing case that approaching Git from a 10,000 ft level is not the best way to understand the tool’s philosophy. Rather, building your knowledge of the tool based precisely on the very concepts that it uses make it much easier to get an overall grasp of Git’s world.
Using Git to Maintain Your Website
Using source code control has always been an effective tool to maintain a web site, especially avoiding these “Uh-oh I clobbered something I shouldn’t have” moments. But Git is particularly well suited to this task, due to its self-sufficient nature. Daniel Miessler shows us how to do just that using Git hooks.
If you enjoyed this post, make sure you subscribe to my RSS feed!
A very geeky Holidays break
Was your break as geeky as mine? Come on, admit it: you’ve done at least one incredibly unsexy thing in the last couple weeks. I know I have. Well, in fact, I had to take a four weeks-long break and it shows in the number of silly things I’ve played with.
In no particular order:
- I improved this blog’s look — well, I like to think that I have:

- I finally created a personalized Twitter page:

- I also created a Twitter page for Twitterified:

- I created an icon set call “More Blaqua“:

- I added a drawer to the Twitterified client - you will see why sometime in January, hopefully!

(Oh, and I finally mastered transparency in Flex, too! Yay)
- I started separating nextBBS v2’s components so that the framework can be used on its own and the message board part is now a module.
It is the first MVC PHP framework that seamlessly support plug-ins.
- I added to nextBBS v2 a limited amount of compatibility with Wordpress plug-ins.
I re-read Getting Things Done by David Allen and made a new year resolution to stick with the program, this time.
So far my Inbox is empty and my tasks list still is a manageable size…
I have installed Medialink on my iMac and use it to stream Divx movies to my PS3. Works flawlessly.
I have also installed PlayOn! in Parallels to stream Netflix. I wish there was an equivalent program for OS X. Well, I “kind of” wish because Netflix’s streaming choice is not that exciting. Not to mention that Netflix innovates by being, to my knowledge, the first company to proudly blog about letting go 50 employees.
- I setup an old P4 with Nexentra. The project bills itself as “The land of free and open source distribution combining OpenSolaris kernel with Ubuntu userland.”
In fact I installed it because I wanted to create a ZFS array. Unfortunately the clunky old PC is way too noisy. Fortunately I realized that a read-write implementation of ZFS for Leopard is available at Mac OS Forge.
- I cancelled XM Radio. They had been annoying me for quite a while, inserting their stupid advertisements in talk radio channels, and now that they merged with Sirius they got rid of some channels I happened to like so, good riddance XM, welcome free radios on my iPhone! — and ironically but quite logically I have better reception in tunnels.
If you enjoyed this post, make sure you subscribe to my RSS feed!
GMail is the new Mutt! Shortcuts galore.
I know, it’s a bold assertion. But, please, bear with me: as a longtime Unix-head, I need a tool that allows me to zoom through my emails rather than click-glance-click-glance-click-yawn-right-click-delete, etc.
For years I’ve been happy with Mutt because nothing compares with using the arrow keys to navigate through my emails, ALT-O to open a folder, SHIFT-O-R to do a reverse-sort, M for a new message, etc.
That, and using Visor, give me the comfort of a HUD-based email management tool whose speed is quite unbeatable.
Unfortunately, with today’s evolution of mail, everything is more or less HTML-based, which really doesn’t work well with Mutt — even using V to open in a text-based browser isn’t that good. If I ask Mutt to open a full-fledged browser instead, there goes the speed advantage…
So, I have reluctantly moved to a pure Google Mail solution and my experience has been positive so far: I run GMail as a standalone program using Fluid — on another platform I would use Prism — and I can keep using keyboard shortcuts for all my tasks!
If you wish to give it a try, start with only this subset of GMail’s keyboard shortcuts: JKEX#[ENTER]U are all you need to replicate 99% of your Mutt experience…
K/J: cursor up/down
X: select message
E: archive messages
#: delete messages
ENTER: read message
U: back to messages list
If you enjoyed this post, make sure you subscribe to my RSS feed!
Google Chrome: an index of what developers need to know (good and bad)
For quite some time, some of us have heard a very persistent rumor about the new Google browser. Well, here it is. And by that I mean: now. Well, tomorrow. And when you see some of the technological pieces it incorporates, it is definitely months ahead of the other guys (Javascript, you are so sexy!)
You can find the official announcement here.
Philipp Lenssen, at Blogoscoped, does a good job of listing the visually appealing goodies offered by Chrome. He even scanned and posted the comic book he got in the mail.
Here is, for your convenience, a list of what’s exciting for developers (oh yeah, it’s open source!):
Each tab runs its own process. Why, in this day and age, should a modern application that will remain open for days or weeks, stick with a memory model close to that of dinosaurs like VxWorks?
It’s WebKit + the V8 JavaScript VM. With a JIT compiler and all the optimizations offered by a VM, we should start seeing JavaScript performance close to that of native languages. Unfortunately, the DOM is not mentioned. Ideally, all DOM manipulation should be also compiled (with the possibility of inlining, etc)…we will know more as soon as we run some tests.
V8 uses aggressive garbage collection. OK I was a bit dishonest in the previous bullet point. This is a bit less exciting than some might think. Yes, there is a cost with conservative collection, since the gc needs to go through the execution stack and identify pointers heuristically and it is impossible to keep track of actual space allocation. Oh, and no generational collection…so, wait, it’s great that we don’t do that, right?
Well, I do not think that it’s the cat’s meow the Google guys are claiming it to be. Precise pointer housekeeping means that your program may incur quite a dramatic overhead, which of course depends on your program’s structure. For instance, one of the advantages of garbage collection is to reduce the need for synchronization in multithreaded programs. Precise housekeeping, however, requires the re-introduction of safe points, which force the compiler to synchronize bits of code where it is safe to reclaim memory. This would explain why some existing benchmarks show the new JavaScript VMs as not performing so well when simply running dumb loops as opposed to performing lots of local allocations.
Tabs run in their own sandbox. That’s certainly a proven security model and it makes it very hard to meddle with another tab’s content. Note that plugins are exempt, however. I wonder if frames are sandboxed,because if they are this is going to break a great deal of pages, just like AIR does.
Google Gears comes standard. Well, it’s no surprise. But it certainly makes me wonder if I want to change the browser requirements for the professional applications I am working on. After all, it’s been proven that Gears can really help desktop-like applications scale more easily.
OK, that’s what I have for now.
Oh, just a last, non-technical comment: I hope that regular users do not read this page and take its content literally. It makes it look like scammers “send users to a nearly exact copy of their bank’s website” and shows a somewhat different URL. People need to be made aware that they could actually be sent to the VERY SAME link as their bank’s and still fall prey to a scammer, since it is possible to fake that link’s destination through DNS poisoning.
If you enjoyed this post, make sure you subscribe to my RSS feed!
How To Make The EFF ISP Throttling Tool Work On Leopard
I love the idea of Switzerland, the new EFF tool for checking ISP throttling; unfortunately as of release Zero.0.5, Leopard seems to still be a mere afterthought. Here is how I worked around the few things that were not working out of the box.
First, Switzerland is written in Python and will require Psyco. It’s a good thing since Psyco is all about performance. If you do not have it already installed:
svn co http://codespeak.net/svn/psyco/dist/ psyco-dist cd psyco-dist/ sudo python setup.py install cd .. |
Download Switzerland from https://sourceforge.net/project/showfiles.php?group_id=233013
Extract it and change to its directory; eg
tar zxvf switzerland-0.0.5.tgz cd switzerland-0.0.5 |
The FastCollector provided doesn’t work. So…
rm bin/FastCollector.darwin |
Now when we build FastCollector, it will be available in /usr/local/bin/FastCollector
Here comes the only moderately scary thing for non-developers. Use the patch command to modify switzerland/client/PacketListener.py. This is the input for patch:
diff --git a/switzerland/client/PacketListener.py b/switzerland/client/PacketListener.py index 211b68f..dc0bbcc 100755 --- a/switzerland/client/PacketListener.py +++ b/switzerland/client/PacketListener.py @@ -93,8 +93,7 @@ class PacketListener(threading.Thread): p = platform.system() # Implementing the recommendations from # http://www.net.t-labs.tu-berlin.de/research/hppc/ - if p[-3:] == "BSD" or p == "Darwin": - print p + if p[-3:] == "BSD": cmd = ["sysctl","-w","net.bpf.bufsize=10485760"] try: # Recent FreeBSDs proc = Popen(cmd, stdin=PIPE, stdout=PIPE) @@ -110,6 +109,14 @@ class PacketListener(threading.Thread): proc = Popen(cmd, stdin=PIPE, stdout=PIPE) assert proc.wait() == 0 + elif p == "Darwin": + cmd = ["sysctl","-w","debug.bpf_bufsize=10485760"] + proc = Popen(cmd, stdin=PIPE, stdout=PIPE) + assert proc.wait() == 0 + cmd[2] = "debug.bpf_maxbufsize=10485760" + proc = Popen(cmd, stdin=PIPE, stdout=PIPE) + assert proc.wait() == 0 + elif p == "Linux": vars = [("/proc/sys/net/core/rmem_default", "33554432"), ("/proc/sys/net/core/rmem_max", "33554432"), |
Let’s build and install everything:
sudo python setup.py install |
Well, it was easy (if it worked!)
Let’s create a log directory for Switzerland:
sudo mkdir /var/log/switzerland-pcaps sudo chmod a+wx /var/log/switzerland-pcaps |
And finally let’s run it:
sudo switzerland-client |
or if you wish to run your own server (you need to advertise it too!)
sudo switzerland-client --server yourserveraddress |
Questions?
If you enjoyed this post, make sure you subscribe to my RSS feed!
Twitterified…at last!
I cannot believe that it took me so long to get my ducks in a row.
First, Twitterified was entirely written in Javascript, like most AIR clients. But some testing showed that rewriting in AS3 would dramatically increase responsiveness.
Then, I had to work on my web framework while creating twitterified.com. And finally I was only able to offer a decent video thanks to the overall godness offered by Vimeo.
But hey, here it is! For a limited period of time, if you go to the invite page and enter the code “nexus”, you will be automatically added to the private beta program.
Twitterified powers up your Twitter experience, allowing it to compete with the “new kids”: Pownce, Friendfeed, etc.
If you enjoyed this post, make sure you subscribe to my RSS feed!
Best Online Storage Service: adrive.com
Yup. I am completely, arbitrarily, crowning them “best service” in my book.
So, you may ask, what amazing feature are they offering, thus justifying my edict?
After all, my previous favourites were xdrive.com and box.com, both piling on announcements of sexy new features, such as an AIR desktop or widgets.
Well, here it is, in all its glory: more free storage space. That’s all. Where xdrive offers 5GB, they, no-doubt, did the math and realized that with storage space becoming an ultra-cheap commodity, they could give their users 50GB free.
So, that’s it. The killer feature: more.
Oh, and, icing on the cake, their web interface doesn’t suck. A mandatory requirement that some free providers seem to forget.
OK, now I’ve listed the whole package.
Of course there are some concerns that I hope they address soon: their “about us” page is quite laconic and they do not seem, like many other Web2.0 outfits, to have thought of a business plan yet. Well, their site offers ads for paid storage services -that so happen not to be theirs. Weird.
If you enjoyed this post, make sure you subscribe to my RSS feed!
Kodachi 0.5.1 now skinnable (and more)
Kodachi v0.5.1 is out! It’s good news for developers who want to write plug-ins or if you wish to change the look and feel of the application:
- A demo plug-in is now included. All it does is add a new direct word to Kodachi’s vocabulary: ‘Demo‘. Type it, select some action, and it will display a Growl-like notification confirming your action. A very easy starting place for budding plug-in developers.
- - Kodachi’s user interface is now skinnable. Actually this goes a bit beyond a simple skin as you can change its behaviour alltogether. Note that when launching Kodachi, you will now see the new demo skin, called ‘Bezel‘, that I created. If you are familiar with QuickSilver, this is certainly an interface you are already used to. If you wish to work with the old interface, simply disable the ‘BezelInterface’ plug-in.
- - The installer now checks which version of .Net is installed on your PC, if any, and offers to install the correct version if necessary.
If you enjoyed this post, make sure you subscribe to my RSS feed!
Air GenPass: Air is easier than you think!
Ever used GenPass? SuperGenPass?
What do you mean, you do not know what I am talking about? Oh, you need to read on.
Of course, I am referring to SuperGenPass, developed by Chris Zarate. This wonderful bookmarklet automatically generates strong passwords for you, based on the url of the web sites you are visiting. You only need to memorize your master password and that is all.
This is a great tool on so many levels. It works for broken brains -like mine: you take all your passwords with you wherever you go since all you have to do is use the bookmarklet in any foreign browser. It is secure: no password is in fact stored anywhere.
What are the advantages of Air GenPass?
- Well, first of all, it allows you to run the tool with web browsers that do not provide correct support for bookmarklets. Safari for Windows, I am looking at you.
- If you are a tad paranoid, like me, but have to use browsers that are unable to store such a big bookmarklet, for instance Internet Explorer or Opera, you may not wish to use Chris Zarate’s server to run it every time you need to regenerate a password.
- If you are at a friend’s house and they do not wish to let you install a bookmarklet in their browser, no problem: GenPass is portable and you can carry it around with you on a USB stick. Of course, one may argue that they still have to agree to install Air
Explaining how this application works is a breeze, mostly because there isn’t much to explain. When you open it, you see three text fields. Enter your master password in the bottom one and click on the tiny icon to close it. The top text field will contain the password generated by the tool and you will be able to copy them to the clipboard using its own icon. The middle field is the one where you will enter or paste the link of the site you are currently visiting. Since Air is a desktop application, you can alternatively grab the link’s icon in your browser’s address bar and drop it on the application.
You can stop reading here and download the application directly if you are not interested in the technology behind this simple guy.
This is my first Air application. So, how hard was it?
I used the latest release of Aptana, which is very nice for creating Air applications. That is, as long as your Air applications do not rely on Flex.
application.xml contains all the information pertaining to your application. Note that this information is not used by the Air installer. It seems that the installer only looks at the certificate used to sign your application. Since the only certificates currently available can be bought from Thawte for several hundred dollars, I believe that the fact that the installer does not claim that “Chris was here!” is a reasonable trade-off.
You can edit this file manually to provide information such as application license and icons.
AIRAliases.js is the library that links the objects used by Air’s bridge.
If you are a total Air newbie, just like I was before I wrote this tiny application, you have no idea what is this bridge that I am talking about.
The first iterations of Air -formerly known as Apollo- did not come with a security model and it was potentially possible to do all sorts of nasty things with Javascript code that could simultaneously talk to the Internet and clobber your local filesystem if it felt like it.
Adobe quickly introduced their own security model, which happens to be kind of kludgey but certainly makes sure that any connection between the World and your local resources is voluntary.
unsafe.html is a html page that is included in a frame. This simple fact means that it has access to all your web browser resources and no access to your computer’s resources. This is the Web sandbox and is usually used as presentation layer.
In my case, of course, because I am a little piggy, al l the presentation is done in the top frame, which happens to have access to your computer resources but cannot run queries to the World or execute arbitrary code through the use of eval() or setTimeout()
Joking aside, it is perfectly legit to use the top frame as presentation layer; it just makes your life harder if you use some libraries that make extensive use of eval()
GenPass.html is our top frame, just described in the previous paragraph. It contains a lot of Javascript and the definition of the iframe
container that links to unsafe.html. I have no right to be proud of this Javascript because I did not write most of it. It’s actually Chris Zarate’s supergenpass bookmarklet code, only modified just to the point where it can be included in an Air application. The rest of the code is the UI, which relies on jQuery. Because, good news, jQuery works on Air!
<iframe id=”unsafe”
src=”unsafe.html”
sandboxRoot=”http://voilaweb.com/”
documentRoot=”app-resource:/”
width=”0%”
height=”0%”
style=”border: 0px; margin: 0px; padding: 0px; width: 0%; height: 0%; visibility:hidden;”>
</iframe>
What’s really important here -save for the fact that I am setting all sizes to ‘0′ because I do not want to display the frame- is the src attribute. The page that will run in the web sandbox is unsafe.html
function notworking()
{
$(’#working’).css(’visibility’, ‘hidden’);
}
// Bridge
var Exposed = {};
Exposed.notworking = notworking;
$(document).ready(function() {
document.getElementById(’unsafe’).contentWindow.parentSandboxBridge = Exposed;
Do not blink: this is where it’s happening!
If it were not for this bit of code, we would not need our iframe. But since we wish to be able to invoke notworking() using setTimeout(), now we have to jump through hoops. Fortunately, these are simple hoops once you understand them.
First, we create an object called Exposed. We store a reference to our callback method in this object.
Then, when the DOM is ready according to jQuery, we take advantage of the fact that top frames are allowed to access the content of iframes: we store a reference to Exposed in the child document (remember that when we created our iframe, we gave it an id of ‘unsafe’? This is how we are accessing it now).
When the user clicks on the ‘Copy to Clipboard’ icon, we display an animated gif: a couple spinning arrows. We wish to display these guys for a second, then get rid of them. Of course, that’s the rub: since we are in the local sandbox, we cannot invoke setTimeout(). No problem! Let’s ask our child document, who lives in the Web sandbox, to do this for us. We are keeping, in our top document, a reference to the only method contained in the child document: localpause(). It is now time to invoke it. Let’s have a look at its content:
function localpause()
{
setTimeout(’parentSandboxBridge.notworking()’, 1000);
}
It is pretty straightforward: after a second, it will invoke the parent’s notworking() method, which will hide the animated gif (see above).
And that’s all there is to it, really.
Feel free to leave a comment if you have more questions.
I want to download it!
Oh, yes. Sure. Clicky.
If you enjoyed this post, make sure you subscribe to my RSS feed!
Kodachi now available through SVN/Trac
You can now anonymously sync. to the bleeding edge version of Kodachi’s source code at svn://nextbbs.com/kodachi
If you do not feel like installing svn/compiling Kodachi but are still curious about its source code, you can browse it at http://www.nextbbs.com/trac/kodachi/
Note: if you sync. to the first check-in, you will get the version of Kodachi that is currently downloadable. If you sync. to the next one, you will get a new version with a temporary default interface. Yes, I am working on adding customizable interfaces.
If you enjoyed this post, make sure you subscribe to my RSS feed!













