Category: Computers and stuff

 | Computers and stuff | 0 Comments

Beware of inadvertent spaces in directory names when using rm -rf, it can kill you without asking first.

I figured I would cleanup some junk piling up in several directories of my laptop: /tmp, /var, etc.

I accidentally hit the space-bar, causing this to appear at the prompt:

$ rm -rf /var /spool/...

And just when that little teenie space caught my attention, it was already too late. There was nothing else I could do but cry. Just for fun (and also hoping for a miracle) I rebooted my laptop, but it choked anyway.

Better be more careful next time.

 | Computers and stuff | 0 Comments | 0 TrackBacks

I'm not about to claim that I'm some kind of expert on the subject, but I think it's fair to say that I've experienced my fair share of ups and downs over the years which makes me a little bit wiser.

Put simply the questions is how do we avoid failure when designing and implementing complex software products?

This is how I would answer that question.

  • The golden rule of thumb to avoid failure is to figure out early what the biggest risks to success are, and then to keep them in mind every single day. Keep this up until success is achieved.
  • Another key to avoiding failure is to admit openly when things start to go wrong, or better yet when you expect that things might go wrong. Don't hide the truth because you are worried that your boss will get angry or that you will lose face with your team members.
  • If things start to go better than expected, then celebrate it and make it publicly known. You guys have struggled really hard and deserve the recognition for work done well. Go out and have a party, but don't get too drunk because it's bright and early as usual the following day.
  • Feel proud of what you are making and treat it like your baby. Protect and cherish it, nurture it and play with it.
  • Admit defeat if needed and just start all over again. It is much better to restart with new insights than it is to plug along with an ugly product which keeps getting uglier, and finally slowly sink into quicksand.
  • Use sound metrics to measure progress and regularly decide where you, where you are headed, and possible obstacles along the way which will delay progress.
  • Learn from your mistakes, write them down, keep this list with you at all times, and reread it at least twice a day.
  • Finally remain open-minded, honest and embrace change, which will happen whether or not you want it to. Change hurts while it is happening, but afterwards it makes you feel a whole lot better.

One could easily say that the statements above apply to developing successful software products as well as to most challenges in life.

 | Computers and stuff | 3 Comments | 0 TrackBacks

In order to retain a well-grounded area of expertise as a so-called software developer, it's not only important to keep abreast of all the latest technologies, but also programming languages in general. The more you know the better.

That is why I make it a habit to learn at least one new programming language every three to five years. That way I can sustain my market value in an ever-changing and competitive market.

This time around Lua is my language of choice, and in order to celebrate my new pursuit of fame and wealth, I purchased the book Programming in Lua.

Here's some sample code. Tables can be used as associative arrays. This functionality allows us to store functions in a class table, ie. with the function name mapped to the function:

A = {}

function A:add(x,y)
  return x+y
end

print( A:add(1,2) )  -- prints 3

That will be a fun book to read during vacation.

 | Computers and stuff | 0 Comments | 0 TrackBacks

You want to be notified by email every time that one of your servers reboots, for whatever reason that might be.

The most straight-forward way to accomplish this is by using the cron service. You want to fire up the following command:

$ crontab -e

and then add the following statement all on a single line:

@reboot echo "Rebooted, now online!" | Mail -s "`hostname` REBOOT" your@email.com

That's pretty easy now, isn't it?

 | Computers and stuff | 0 Comments | 0 TrackBacks
Hey, it turns out that the del-key on my laptop doesn't stick anymore, and I hadn't even noticed it. Remember that blog entry back in April where I was feeling irked enough that I even had to dedicate a whole entry? I guess that due to lots of usage something or other has loosened up beneath the key, and no matter how hard I try now I cannot get it to stick any more. That's fantastic news, even though it's a bit strange how I hadn't even noticed it.
 | Computers and stuff | 0 Comments | 0 TrackBacks
I've learned an awful lot about the many ins and outs of managed virtual servers the last few weeks. It's been a fun adventure talking with companies and the experts about the fine art of managed hosting.

There are many advantages to choosing a virtual environment over the more commonly accepted hardware options. It really boils down to a choice between two options:

  1. Make a big one time investment in hardware and write it off over a five year period. Hopefully within that time frame one can use the costs more effectively by maximizing the use of computer resources.
  2. Or rent the computer resources (CPU, memory, storage, etc) on a monthly basis. As time progresses one can easily expand the resource depending on current needs. Costs are kept more under control and growth should be more predictable.
Another interesting topic of discussion which can get hairy and even philosophical at times is the difference between fair use and bundled bandwidth policies for network usage. A couple of people have discussed it with me but I'm still not convinced about one being any better than the other.

 | Computers and stuff | 0 Comments
I hate it when my Del-key keeps sticking.

Up near the top right hand corner of my keyboard the keys are a bit less sturdy because the CD bay is directly underneath and leaves little room for a sturdier padding.

This means that when I hit the Del-key, it feels hollower than the other keys and tends to stay stuck in the depressed state, popping up and making this slightly aggravating click after anywhere from a half second to five seconds later.

One might of expected better quality for a laptop this nice.
 | Computers and stuff | 0 Comments
If you own an MSI Wind Notebook like I do, and the next time you fire it up there's no wireless connection available for some reason, don't forget to first make sure that the wireless card is enabled (duh).

Is the little green led second from the left lit? If not then you'll have to hit the Fn+F11 key.

Why waste two hours of your valuable evening searching everywhere and getting frustrated when the solution is right before your nose?

This is already the 3rd time it's happened to me and you'd think that I'd remember by now.
 | Computers and stuff | 0 Comments
My old laptop has survived nearly four years without a hitch, not once infected by any virus, working smoothly and always to my satisfaction.

Since I got a new laptop, I decided to pass on my old one to the kids, let them have yet another computer to play on.

Now it is infected with a virus, after only a couple months of use, something to do with a buffer overflow warning message that McAfee keeps popping up. Tried to fix it but things slowly got worse, until the laptop refuses to startup at all.

So now I'm reinstalling Windows XP (they didn't want Ubuntu, believe it or not) which will take awhile, but the machine will be clean and free of junk.

Hopefully it'll stay that way for some time.
 | Computers and stuff | 0 Comments | 0 TrackBacks
Why would anyone in their right mind want to exchange the Fn and the Ctrl keys on the keyboard? This is confusing and pissing me off.

FnCtrl.jpg
What's wrong with this keyboard?

Recent Assets