I’m REALLY tired of people asking me advice on “Hey, what kinda laptop should I buy?” when I have no freaking clue because I’ve been happy with mine for the last 2 years, don’t plan on buying a new one anytime soon and I know jack shit about laptops or hardware in general. I’m a Software Engineer, note how there’s no “Hardware” in there. It’s like someone asking a guy that makes GPS for cars what is the best car for them.

But I do buy electronic hardware, so here is how I do it. For simplicity’s sake I’m gonna use a laptop as an example but this “guide” pretty much applies to any thing you want to buy, from a blender to a gaming computer.

Visit the stores

First of all, go visit hardware stores near you. That’s right, go waste a good 4-6 hours, drive/walk around, find a handful of brands and models you like and take notes. Preferably take photos too. Make sure to take note of the prices too.

Research

Now that you are home, get those brands and models you took note and start searching for things like

“BRAND MODEL review”

“BRAND MODEL comparison”

This will show you some reviews and comparison against similar models.

Prefer reviews from actual people instead of bloggers who just want to gain visits.

Youtube videos are (sometimes) good source for reviews.

Read at least 5 reviews per brand/model.

See ratings people gave the laptop on sites such as amazon.com/co.uk, cnet.com, etc.

Make sure you read comments (if you do end up reading blog reviews).

Consider wasting an hour for each $100 you want are willing to spend to buy the thing you want.

Search for problems

Next search for

“BRAND MODEL problem”

“BRAND MODEL is crap”

Now this is the real critical test. It should give you a good overview of what problems you can expect from your laptop and how satisfied are people with the laptop. If you only get random problems such as “I turn on laptop as soon as I got back from the store and it exploded!” then you are looking at a fairly safe buy. If you see a lot of people complaining about the heat, laptop shutting down after a few hours, crashes, etc… then consider another one.

The decision

Finally, weigh in the price, tech support you can get from the store you are planning to buy from, reviews, problems, technical specifications, etc, and try to make a decision. It is never simple.

Still need help?

Other things you can search for if you need help, for example:

“Best Laptop “

Remember to check last year too when searching for “The best laptop”. You get good deals on later models during stock clearance.

“How to buy a Laptop”

For this one remember to ignore sites which have more than 2 years. They are usually outdated. If the site you are consulting doesn’t have a timestamp on the information it is providing then ignore it too, it’s probably a crappy site anyway.

What about the tech specs?

Most of the times, manufacturers offer pretty much the same thing at very similar prices. But you can always check Wikipedia and the “How to buy a …” guides on technical things to look at and which ones are better. Make an informed decision on what is the best thing for you: RAM, CPU or/and Graphics Card. It all comes down to those 3.

A very specific argument that arises when discussing indentation styles is Tabs versus Spaces. For me, there is no argument. It’s the one thing I could never, ever, adapt to when writing code. Before I get flamed for my rant lets check the pros and cons and the typical arguments made by space-lovers. No, not the outer space, I mean the largest key on your keyboard.

View Code

If you use spaces, your indentation will always look the same, be it on your favorite IDE, vim, pico, joe, Kate, Geany, cat, less, more, github online, bitbucket online, etc. But… it will always look the same to you and everyone else. Let’s face it, we don’t all have the same tastes. When coding in group (job, school, hobby) we already have to agree on indentation style, so why should we also give in when it comes to indent spacing? If we had no option… but we do! We can use tabs and everyone can space it to whatever they want since almost any editor out there supports changing the tabsize. Even in your virtual terminal you can change tab size with ‘tabs’ (if the VT supports it).

Editing Code

Previous argument in favor of using spaces makes me wonder if a programmer spends more time reading the code or editing it. It’s quite simple. Hitting tab costs you 1 key stroke. Hitting 2, 3, 4 or 8 spaces costs you… 2, 3, 4, 8 times more keystrokes. Look at your code. You will see that a great part of it shows you spent more time hitting the poor space bar (or tab key) than any other key.

Now is where you argue that in your editor when you hit ‘tab’ it fills in the spaces for you. Excellent! Now lets go back to the previous argument. You said it was so you could look at code anywhere and it always looks the same. Well… I prefer to edit code the same way on any editor. Tab is my universal indent key and delete/backspace is my universal unindent key. If you use spaces that is no longer true and you will end up making small indentation mistakes more often than not and that leads to very ugly code.

Bottom line is, spaces will always cost you a lot more keystrokes when compared to using tabs. The more time you spend typing white space the more time you waste because white space is non productive. Unlike using long variable/function names or writing lots of comments and documentation about your complex code.

The Script

If you are indeed forced to use spaces instead of tabs because whatever reason, you can always do like me and use a script to edit your code from/to spaces.

Save this to a file, put it in your path and then give it exec permissions (chmod 755 <file>). It takes 2 arguments. The first is either t2s (tabs to spaces) or s2t (spaces to tabs). The second one is if you only wish to change files which have a certain text. For example, I use:

1

2

3

my_spaces2tabs.shs2t"@author me"

This makes sure it only changes files which have me as the author (provided I put my name on all files I change). This script allows you to change all files, recursively, from the current folder where you are running the script from. So just set your terminal’s current directory to your source folder and run it.

Now lets look at that first line in the script since you probably should change somethings there.

1

2

3

FILTER_FILES="\.((cpp)|(hpp))$";BACKUP_EXTENSION=".bak";SPACES=4

These are 3 variables. First one is FILTER_FILES and it’s a regular expression to filter the files to process. The one I’m using filters C++ source (cpp) and header files (hpp). Second one is BACKUP_EXTENSION. I keep this in case something goes wrong. This one makes a backup of each changed file. The variable hold the extension used for the old file. You can then add this extension to your SCM ignore list. The SPACES variable is self explanatory, it means the amount of spaces that correspond to a Tab.

Save the file (Ctrl + S). If you get an error saving it is because you are editing the file under the ‘Program Files’ directory. First make a copy of the hotkeys.exe file into the desktop. Edit this file. Then copy back the file into the ‘Program Files\QLiner’ directory.

Install the previously download drivers and select the correct card and port into which the monitor is now connected. (Be aware that a VGA port is ‘Analog’ and HDMI/DVI are ‘Digital’, when the installer asks you that question)