Slash vs Backslash

A thread on Hacker News about the eternal confusion between / and : jordanlund: Confession time… I always get confused about which one is the slash and which one is the backslash. I end up calling them “the one on the question mark” and “the one not on the question mark”. zem: Here’s a simple trick: \ leans back, / leans forward. grantrules: _ is a slash that got tired and lay down. ...

2 April 2010 · 1 min · 140 words · Shafiq Alibhai
GNUSL3S LINUX OS

GNUSL3S Linux

GNUSL3S Linux is a distribution built in Goa. It bundles a wide range of pre-installed software spanning bioinformatics (EMBOSS, Primer3), security tools for penetration testing, system administration utilities, and development editors. Boot from the DVD for a graphical interface with KDE, XFce, Fluxbox, or IceWM. Based on: Slackware, SLAX, Alixe, Davix Version: 10.05.xx Architecture: i486 (32-bit) Origin: Goa, India Status: Discontinued

29 March 2010 · 1 min · 61 words · Shafiq Alibhai

Typo3 Reference Manuals as a Chrome Extension

My first Google Chrome extension. It’s a collection of Typo3 reference manuals compiled from typo3.org. Useful if you have a slow or unreliable internet connection (looking at you, India), or if you prefer to stay in the browser while searching the Typo3 swx reference manuals. I wanted to publish it on the Chrome Extension Directory, but the file is 19.86 MB and Google has a 10 MB limit. If anyone knows a workaround, let me know. ...

27 March 2010 · 1 min · 84 words · Shafiq Alibhai

Identifying Your Linux Distribution

Not sure which Linux distribution you’re running? Open a terminal and type: cat /etc/issue On Debian 4.0, for example, this outputs: Debian GNU/Linux 4.0 \n \l The \n and \l are escape sequences for the hostname and terminal device – they’re not part of the distribution name. This works on most distributions. Some also have /etc/os-release with more detail: cat /etc/os-release

23 March 2010 · 1 min · 61 words · Shafiq Alibhai

SVN revision control – slides

I put together a presentation on Subversion for a class this semester. The slides cover the basics of revision control and why you should be using it for any project with more than one developer. The problem is simple: how do you coordinate code between multiple people without everything falling apart? You could work on the same machine and take turns. You could email files back and forth. You could dump everything on a shared drive. None of these approaches scale past two people, and even then they’re fragile. ...

22 March 2010 · 1 min · 183 words · Shafiq Alibhai

Scrum in 8 Steps

Scrum breaks a product into small pieces (backlog items) and works on them in short iterations (sprints). Here’s how it works in practice: 1. Prepare the product backlog. List the features and requirements. Involve stakeholders to prioritise. The product owner is responsible for the vision and goals. 2. Estimate the backlog. As a team, give a rough estimate for each item. Planning poker or t-shirt sizes work well here. 3. Plan the sprint. A sprint is a fixed period – usually one or two weeks. In the sprint planning meeting, decide the duration, goal, which backlog items to tackle, the tasks for each item, and the hours per task. The result is the sprint backlog. ...

22 March 2010 · 2 min · 277 words · Shafiq Alibhai

Show Your Learning on Your Resume

A degree gets you noticed. What you’ve done since then gets you hired. Here are some ways to show continuous learning on your resume: Professional certifications. They demonstrate you’ve met industry standards and can help you stand out from candidates with similar qualifications. Publications and articles. Writing shows you have something to say and can communicate it clearly. Use them as portfolio samples. Presentations. Speaking at universities, schools, or conferences demonstrates communication skills. Record them and post them online. Volunteer work in your field. Shows genuine interest in your work beyond paid employment. Technical courses and training. List them alongside formal education. IT certifications. Microsoft, Cisco, and similar credentials prove specific technical competence. Many employers look for them. Foreign languages. Learning another language opens doors and shows cultural awareness. Rosetta Stone and subtitled DVDs are good starting points.

22 March 2010 · 1 min · 138 words · Shafiq Alibhai

Installing PHP 5.3.1 on Ubuntu

Two lines. That’s all it takes. Ubuntu x64: sudo su cd /tmp && mkdir php53 && cd php53 && wget http://php53.dotdeb.org/dotdeb_all.deb && wget http://php53.dotdeb.org/dotdeb.2004.02.25.key && apt-key add dotdeb.2004.02.25.key && dpkg -i dotdeb_all.deb && aptitude update && aptitude install php5 Ubuntu 32-bit (i386): Same command. The dotdeb repository handles both architectures.

17 March 2010 · 1 min · 50 words · Shafiq Alibhai

Reading a File into a Variable in Perl

For large files, consider File::Slurp. It’s faster than the conventional approaches: # Slurp the whole file { local $/ = undef; open my $fh, '<', 'myfile' or die "Couldn't open file: $!"; binmode $fh; my $string = <$fh>; close $fh; } Without binmode: { local $/ = undef; open my $fh, '<', 'myfile' or die "Couldn't open file: $!"; my $string = <$fh>; close $fh; } Join the lines: open my $fh, '<', 'myfile' or die "Couldn't open file: $!"; my $string = join('', <$fh>); close $fh; Append in a loop: open my $fh, '<', 'myfile' or die "Couldn't open file: $!"; my $string; while (<$fh>) { $string .= $_; } close $fh; Read a fixed number of bytes: open my $fh, '<', 'sample.txt' or die "Error: $!\n"; read($fh, my $data, 2000); close $fh; The read function takes a filehandle, a destination variable, and the number of bytes to read. The example above reads 2000 bytes into $data. ...

15 March 2010 · 1 min · 183 words · Shafiq Alibhai

Restarting a Project from Scratch

Every programmer knows the urge: scrap everything and rewrite it from scratch. It’s not that the existing code is bad. It’s that it’s hard to understand. Reading code is harder than writing it – you wrote the new code in your head, but the old code belongs to someone else (or to past you, who might as well be someone else). This is why every developer on your team has their own favourite way of splitting strings into arrays. Writing a new function is simpler and more enjoyable than learning how the existing one works. ...

8 March 2010 · 1 min · 106 words · Shafiq Alibhai