Categories
Looking glass
Navigate/Search

Archive for the 'software' Category

10 ways to spend more time “coding” with friends

Tuesday, October 3rd, 2006

For the uninitiated:

Q) Have you ever wondered what a software developer REALLY does?

A) Sit in front of the monitor confused. (or cursing… or both)

A while ago, I read an article about how developers spend their time. What Jeff Atwood postulates is that developers spend MUCH more time understanding code rather than typing in new stuff. I have to agree, with some colourful comments:

Its inevitable; the moment we do a linebreak, chances are that line is code is going to be modified in a near future. Better yet, the amount of time spend on doing so is small compared to the amount of time reading and understanding it! And this is your own code! Imagine how its like working with 5 people, or worse… 10?

Since we humans enjoy the company of each other, how about a little guide on how to spend more time code-staring together:

  1. Do not comment your code. We are all Rockstar Programmers. The code speaks for itself, extreme L337n355. Actually I heard that is an actual Perl feature… not supporting multi-line comments and all. Straight from somebody who truly appreciates Perl: “Don’t use multi-line comments. If you have a piece of code that requires a multi-line comment, rewrite it so it doesn’t need to many lines of comment”. Genius!
  2. Do not use version control. Its bad, its got 666 hidden somewhere in the source as a pre-proc directive. As an added bonus, when we overwrite files entirely, we just obliliterate it! BOOM, gone.
  3. If you must use version control, take every opportunity to break the build. Its fun to update and find out that something you need to use is broken, especially if its not yours.
  4. Do NOT use a debugger. Instead, use good ‘ol print-screen debugging. (heh, Here’s Linus Torvalds in an article called im-a-bastard-speech). For more fun, use print-screen debugging in concurrent programs or even better, when print-screen debugging is affecting the memory so that the behavior of your code changes.
  5. Do NOT use already made functions, like for example in the libraries. I mean come on… where’s the fun if we use something that has been around for years and proven to function properly? Let’s rewrite atoi() and use it… its useful for interviews anyway.
  6. Always copy and paste code! Typos that get in, stuff that isn’t relevant in the current context, the more, the merrier.
  7. Do not design or architect your code. Planning is for the weak puh! The ad-hoc way of programming is more fun, just like writing essays and gets quicker results! Design patterns? Get OUT of here! We are smart people, we do not need to use what thousands of lesser geeks have been using to improve their architectures.
  8. Run away if you have to practice Test-Driven development. Similar to version control, it has its origin in the worship of pagan lords; the temptation to have PRECISE requirements at coding time or to have HUGE time savings in the long term in terms of debugging can be hard to resist, but those are all evil.
  9. Hack up all your classes together and don’t use helper functions. High cohesion and low coupling are to be avoided like the plague! Why have multiple files? Multiple classes? No way! Oh and let’s group classes together, sorting them by alphabetical order, the code is neater that way.
  10. Hate process, even more so when you’re in a multi-person team. Project plans, Software Specifications, Software Architectures and Test plans are for wussies. Who the hell needs UML? You can draw pictures that nobody will understand an hour later. That way you look smart, you keep your plans secret and thus your job forever and you look smart.

The list can be much longer than this, but 10 is a nice number plus I’d have to write more as opposed to reading code.

For people who actually want to improve themselves, check out Software Carpentry, authored by Greg Wilson. It contains a series of lectures, including a section on the software development process.

Toronto DemoCamp 9

Tuesday, September 26th, 2006

Hello blog.

I have been abducted by aliens for the past couple of weeks and they allowed me to go back to earth for the DemoCamp and to write this blog post. DemoCamp 9 has been yet another awesome outing. Lots of regulars and new people as well, and amazingly cool demos. Today, we’ve had folks driving 3 hours all the way from Sudbury, talk about dedication!

That’s [H]ard man, and they had an awesome app as well, but we’ll get on that later. This week, our Phys. Ed. graduate cum technologist David Crow finally turned up with the Barcamp T-shirts! They were actually stored in a warehouse in the alien complex I’ve been in and the abductors thought it would be nice to release us all at once.

Ahh DemoCamp… it’s been 2 months. We had BarcampEarth last month (for which I still have draft articles yet to post! >.< ) as documented by Ryan Coleman, Peter Dawson, Ryan McKegney amongst others. In any case, here is my transcription of DemoCamp which took place today:

Dictabrain

Dictabrain is a venture founded by James Wood, and having Vlad Jebelev on board, both ex-Cows from Tucows. The webapp targets the people that tend to vocalize their thoughts more than they can write. These people usually record whatever they’re saying and need to somehow transcribe that to a written format to store or to share with other people.

The app, using a telephone, matches the calling number with a predefined setting, requires a PIN and allows the user to talk his/her heart out. Then the brain behind Dictabrain (a female brain I should say) transcribes this voice to text rapidly and posts it for the user’s convienience on the web. (EDIT: The beer must have been having a conversation with me at that time cause I didn’t catch it, but apparently, the transcription is human-based. Hmmm… not as cool as I thought).

The duo wanted to show off their baby and need alpha testers to see how much their Dic-Ta-Brain stretches. They are proud RoR developers and run Asterisk, the open source PBX. They plan to be live in a month to a month and a half.

InfoQ

The dude behind TheServerSide.com (An enterprise Java news site/community and more), Floyd Marinescu, is at it again with InfoQ. A very impressive demo with thoughtful uses of AJAX. It is a news/article website geared towards the enterprise software development community, with exclusive news reporters and column editors.

Completely and thoughtfully Ajaxified, the website allows you to tailor your news depending on the “community” of your choice. Funny enough, Ruby is one of the choices, and although I think Ruby is cool at all, I hardly consider it “enterprise” in its current state. The developers at InfoQ push the envelope even more by allow a user to have a personalized RSS feed. How cool is that?!

As well as posting filterable News posts, InfoQ proposes exclusive articles, white papers as well as videos of conferences. They plan to release videos every couple of weeks or so. When viewing videos, get this, they use the concept of widgets to turn a side-bar used for navigation into a content-container in case you’re in the boring part of the vid. How COOL is that?!

In addition, they offer tagging, internationalization (Chinese soon to come), AJAX mouse-over comment-thread reading (try it!). They have 1500 unique visitors everyday, which for a June launch is pretty good. Implemented using Spring and Jackrabbit, they are [E]nterprise to the bone. This is a keeper, definitely check it out.

ConceptShare

After seeing such a cool demo, we didn’t expect to be wowed again by another one. Enter ConceptShare. These are the 2 people that came all the way from Sudbury, a.k.a. the boonies. It is a web collaboration tool for basically everything that has some visual element to it.

ANOTHER collaboration tool you might say, NOT SO they say. Rather than calling it an online collaboration tool, Scott Brooks prefers to describe it as a tool to get feedback and to share ideas with people working on the same project. A very humble description, as I think it ‘s FRIGGIN AWESOME.

It allows users to annotate, comment and draw on pictures. Of course, you can add people from your group or choose people that have made themselves available for consultation as “experts”. The users can circle things, point at things and write little comment bubbles, read what other people said, chat live, and read chat logs.

This is AWESOME for working with customers, as it cuts down on the MOUNTAIN of lost email, pdf’s and *shudder* FRICKIN Word documents all over the place. (!! PLEASE NOTE: Word or any MS fileformats are NOT exchange formats!!). For technologists this is awesome, considering the lack of people skills we have, to discuss UI with other people.

They’ve also got an impressive and fast image scaling feature with little resolution loss which has to be seen to be fully appreciated. They have RSS feeds for comments and support all kinds of files for upload. They are currently going into private beta and are pondering what the pricing is going to be. THE NEWS: It might go from free trial services, $12 small company accounts, $59 for slightly larger ones up to $99. SOLD!.

the eMail Company

You’d think the eMail Company is one that offers hosted email or something. Maybe not, but at least I would. What they do in fact is email marketing. What they propose is a web app with 3 distinct components:

  1. Forms, the stuff users fill out on the internet with checkboxes, input fields, radio buttons, numbered, bulletted. The kind of stuff you’d find at tickle and the like, or applicant screeners for job applications like Taleo.
  2. A form creation tool, for creating those annoying to fill pages. There are extensive controls, from HTML input types to CSS styles.
  3. A dataview section with statistics collected from the forms, with bar charts, histograms and pie charts.

They propose a service that can create extensive and complex forms with branching capabilities out of the box, complete with data viewing. I can see the value in building such an application, but I think it could use some AJAXifying goodness. It works as of now, but it could be made prettier as well. In any case, they came for feedback, and I’m sure they came to the right place to get some.

Pursudo

Pursudo is the craft of love of the guys at Unspace. Rabid RoR fans, they go as far as saying that nothing they do could’ve been done without Rails. That’s a very strong statement! Although I believe Rails is amazing, I also believe some other people are trying hard and are actually coming very close, check out TurboGears, and Django. Anyhow, this project has been made in a total of 3 days of design work and 10 days of development. Not Bad!

This project has absolutely no profit motive and has been made out of fun. With the aim of better matching people than regular matchmaking websites, Pursudo aims to make people meet by doing things together. Selecting people by City, Gender and Age, the list of people can be filtered to a user’s preference. One thing to note is that the list of people can become longer as you’re scrolling down, something a computer geek might smile at because it could hypothetically allow a bored user to scroll down infinitely.

I guess a good way to describe this website would be: “An ode to Ruby on Rails”.

Epilogue

It was nice to be at DemoCamp again. The exchange of ideas, the conversations, people you meet every month with this common interest for anything new on the computer horizon. I had a good time chatting with Scott, Brian, Sutha, Jay, Colin, Slava, Alan and briefly with Ian. Although I couldn’t stay very long, I realized again how events like these are breeding grounds for innovation. No wonder all kinds of *Camp are springing up; like CaseCamp for marketers and CopyCamp regrouping musicians, artists and lawyers for discussions on the topic of internet-age copyright.

Viva *Camp.

trac installation woes

Thursday, August 31st, 2006

Trac is by far the best developer-centric project management tool i’ve used so far. I’ve always had the pleasure to use it, but thankfully not to administrate it. After 4 configurations, compilations, and installations (all done manually of course) of all its dependencies (yes 4 installation CYCLES! and that does not count the number of times trying to fiddle around and coaxing it to work), namely:

  1. Python 2.3.5
  2. SQLite 3.3.6
  3. PySqlite 2.3.2
  4. Clearsilver 0.10.3
  5. Subversion 1.3.2
  6. Swig 1.3.29
  7. and finally, trac itself, 0.96

it now gives me a segmentation fault??! At the admin configuration step??????! GRRRRRRRRRRRRRRRRRRRR I’ve been going at it on and off for 2 weeks now, am I missing something?! Geez! I’m very close this time though… very… I can smell the ticket messages clogging my email.

For a more complete picture, click here.

On another note, because of trac and whoever’s responsible for the installation documentation, I have been delayed with
posting my notes on barcampEarth. Those are to come soon.

If you don’t code

Thursday, August 24th, 2006

If you don’t code try this. You might like it! It is an interactive, “hands-on” tutorial to Ruby, the programming language. If you do code, try it anyway if you haven’t picked up Ruby yet. This tutorial has been made with the beginner in mind, so the author does quite a bit of hand-holding. While it might be a bit basic for the more advanced hackers (still worth it though), the beginner will definitely find it fun to go through it. It has been written by the author of Poignant’s guide to Ruby, an illustrated (as in containing cartoon strips) and funny book with the odd enough goal of teaching a programming language. Did I mention the book is free and downloadable? :-D

After a couple of months of fiddling around, I had not picked up Ruby just yet. Deciding that was enough pushing back, I dive into Ruby (pun intended). Its a programming language that’s built in such a way that it feels very natural using it. One thing that makes it intuitive is consistency. Everything in Ruby is an object (for the neophytes, an object is the term we use to represent a ‘thing’, anything you make it to be), which isn’t necessarily true in other programming languages.

If you do code a lot

I’m only getting to grips with Ruby, so I’ll refrain from giving any premature opinions. Non Ruby-speaking adept coders should check out these 15 exercises to get familiar with a programming language, I highly recommend it to learn any language. What I can say though is that so far, Ruby is very fun to use, and I think it is a suitable first programming language, containing enough advanced functionality.

Who knows? Ruby may even cause a comeback in style of metaprogramming.

Old hardware help in Ubuntu

Saturday, July 15th, 2006

These are the steps I took in enabling the ESS 1869 sound chip to work in Ubuntu.

These fixes will actually work on any GNU/Linux distribution provided you have alsa. This is a fix for the ESS Audiodrive 18XX series of sound chips, not just for the 1869. Those chips were low cost alternatives to full fledged sound cards such as the Sound Blaster 16, both running on an ISA bus and with comparable features: Full-Duplex sound, 44.1kHz 16-bit audio sampling, FM synthesis and Plug-and-play(pnp). Mind you, pnp was a great feature at the time! No longer did you need to manually configure the settings, the drivers would automatically detect and configure the hardware… at least in theory!

Manual configurations were still required to guarantee smooth operation, pnp hence obtaining the redefinition of “Plug and Pray”. In my case, this is exactly what happened; ISA pnp is a little bit flakey and to make the sound chip work, I had to specify the drivers as well as the card settings.

A driver is a piece of software used to allow the kernel (the operating system) to interact with some hardware. modprobe is a tool used to add or remove modules from the kernel (the real operating system) and we will use it to load the driver. sudo (super-user do) is a program used execute other programs with super-user priviledges (similar to an administrator for windows users), alternatively, one could use the su command to put a terminal in super-user mode.

Step 1

Go to /etc/modprobe.d/ and create a file name soundcard there. ( requires super user priviledges)
Copy and paste this in the file:

alias sound-slot-0 snd-card-0
alias snd-card-0 snd-es18xx
options snd-es18xx enable=1 isapnp=0 port=0×220 mpu_port=0×388 fm_port=0×330 irq=5 dma1=1 dma2=5

The “options” line should contain the settings of your sound card, which may or may not be the settings above.

Step 2

To test if the settings are correct, try these commands on a terminal:

sudo modprobe snd-es18xx
sudo /etc/init.d/alsa-utils restart

Now play a sound file. If it works, awesome, if not, you may have to change the sound device settings to use Alsa. If it still doesn’t work, maybe you have to change the sound card settings.
Step 3

For a permanent fix, you will want to load that driver module everytime your computer starts.
Edit the file /etc/modules and add the following line to the bottom:

snd-es18xx

and voilĂ , you’re pretty much set.