Coffee carrying tips

As someone who primarily commutes by means other than car, I find myself carrying coffee quite a bit and through my own observations and other people's tips I've mastered the art of carrying a cup of coffee without spilling it. Even for a 10 minute stroll. So here are my tips for being a coffee carrying ninja.

  1. Hold the cup closer to you and higher up. You may instinctively want to protect yourself and hold it further away but it will swish more and you're more likely to make a mess.
  2. If your coffee is in a paper cup with a lip, rotate the sipping hole so it lines up with split in the cup where it's glued together. Then ensure the hole is point to your left or right. Naturally the liquid is more likely to swish from the front to back. This means it's less likely to come flying out the hole or get liquid caught between the lid and cup around the seal. If that happens the heat will start to undo the glue and it's only going to get worse.
  3. Don't buy coffee from any place that tops it up with water right to the top or is too cheap to give you one of those heat rings to protect your hand. Too much liquid and fidgiting to avoid burning yourself will end in tears. I personally recommend Caffè Nero. Their cups appear to be stronger, they give you the heat protector as well and don't water down your coffee like a savage.

That's all it really takes to keep yourself from making a mess even if you're a bit of a fast walker. of course putting milk in your coffee resolves a lot of the heat issues but if you like coffee you wouldn't be putting milk in it anyway!

Posted by toadwarrior on 9 May 2013, 10:21 p.m.

Globalisation is a good thing

I like globalisation and the idea that I could buy any film, music or game from any where in the world. I like the idea I could move anywhere in the world without someone trying to stop me.

Unfortunately we don't get that. Mark Zuckerberg and Marissa Mayer are pushing for the US to update its immigration reform. I don't support that because it's not really about globalisation. It's about driving down wages.

Perhaps if they provided their content on a global basis and pushed for the free flow of citizens then I could get behind that but that's not what they want.

I don't believe your average British or American is racist or really hates the idea of foreigners coming to their country. But they can spot that they're getting a raw deal. If they could move easily too then they could go to Hong Kong, for example, and fill roles there. Hong Kong and China apparently have an IT skill shortage in the making. For a lot of Americans it may very well make sense to go there. But then that would mean Facebook might have to be more competitive with their wages and they don't want that. If you could access content from anywhere in the world then why would you pay a local rate of maybe £12 for a CD when it could be had for the equivelant of £2 from India?

I believe real globalisation could benefit everyone and it's worth our time to support that. But I don't think we should support immigration for the purpose of wage depression.

Posted by toadwarrior on 16 Mar 2013, 1:30 p.m.

Why you should learn to code

I got my "angry nerd" rant about some "learning programming" initiatives but hidden in there was the point that programming is fun and it beneficial help you do things you may care about more. Programming as a career isn't for everyone but being able to, for example, automate ripping DVDs and origanising your digital files will be easier and more fun when you can write the code to do that and that alone is the reason you should learn to code.

If you would like to learn to programming, for starters, you should listen too much to programmers. You'll hear about functional programming, object oriented programming and other things you shouldn't really concern yourself at first. You should find something that takes very little effort to start. Programming is about solving a task. You don't really want to program as such. You want to organise your MP3s, for example, so setting up have to worry about a lot of setup before even getting to start won't be fun. I think there are two languages that fit this well.

JavaScript

The first language I would suggest is JavaScript. In many ways it's a horrible language and if you stray too far into the depths of the JavaScript community you'll find people recommending overly complicated libraries, some of which might not do what you want because they don't like semicolons.

JavaScript is something you can just run in your browser. You have everything you need. All you need is a text editor to enable you to write code. But to help make things a little easier I would suggest getting Firefox (It's the best browser anyway), the Firebug add-on and what that will simplify things even more. Now you have a quick easy console that will let you write JavaScript without caring about HTML.

And again I'd stress it's probably good thing to avoid seasoned JavaScript programmers who will insist you use their favourite library. Forget libraries and take it easy. Mozilla not only offers a great browser but a great starting point to learn. If you go to the Mozilla Developer Network you have everything you need. Under Documentation you will see a JavaScript Reference and JavaScript Guide. These will always come in handy even as you get better. But Mozilla does a good job at explaining things and you'll get further than asking around on message boards. You'll also see under Tools & advanced resources three good links for learning how to start. There's Code Academy which will allow you to just learn straight JavaScript and, should you choose two venture further than that section, you can click on "Learn" and select another language. Code Academy will also allow you to write code in the browser without having to learn Firebug which, while easy, probably is a bit unnecessary at first. But that's what happens when you ask a programmer what to do!

Python

Python would be my first choice and in my opinion it is the best all around language on the planet. I suggested JavaScript first because it should have the absolutely lowest bar of entry. Python isn't much harder. You simply need to install the libraries and work out of Notepad or, preferably Notepad++. Code Academy will allow you to write python in your web browser as you learn from them if you're concerned about setting up an environment.

Python is much cleaner, can be written in such a way that it sounds almost like English and since can be used offline as well you can use it for tasks like moving files, renaming things, etc so you might find it moe easy to come up with tasks you want to complete which will push you to learn more. Python also offers a fairly easy and simply tutorial to help you get started and you should be able to do it from your command line without having to worry about saving files and executing them. That is the benefit of python in that you can just type python on the command line and you will be given an interactive environment to just start making things happen.

Like their tutorial, their library documentation and reference is all well written and will generally come with code examples on how you can use it. The biggest problem with learning a language, in my mind, is finding a good solid resource that helps explain things to you and quite frankly Python does it better than anyone. It also happens to have a book by David Beazley called Python Essential Reference which is very well written and helpful without being your typical thick programming book. Just to note it is a reference book too so it will only be useful once you pick up some of the basic of general programming.

And that's it. Those two languages will allow you to easily slide into programming and with Python in particular it's a nice language to for those who might only want to program as a hobby. It will still let you do anything from making web pages, to desktop programs / games or even simple scripts. I think that will help make learning programming for you easier. You will have to think less about how you need to write code and can just focus on what you want to make.

Posted by toadwarrior on 13 Mar 2013, 11:57 p.m.

Why you shouldn't learn to code

Hadi Partovi and Ali Partovi have launched a non-profit organisation called code.org whose premise is to get everyone to code and they've even released a video on youtube showing you how awesome programming jobs are.

I really annoys me when people push initiatives like this. Does that mean I don't want people to program? Nope, I do it for my career and I do it in my free time. Writing code is awesome. But let's be realistic here. Programming isn't syntax and isn't something you can learn in a couple days in some "Learn to program" course. What you're learning is just syntax and some very basic logic.

All those offers of fun offices, free laundry services and free food in the video, that's not something they're doing for your benefit. They're doing it because they want you to be there for long hours. If you spend half your day at work then you'll probably start realising it's eating into your life. How do you stop employees from feeling that way? Free food, some time to play and free laundry service and you know what, it would be worth it if you're really passionate about your job. But surely if you were that passionate then you would have already taken up programming? There is also the fact that for every one job that does that for their employees, at a guess, there's thousands that do not. It's not a realistic view on the job.

These are companies that avoid tax ([1] [2]) and will ruthlessly throw you out of your job and that's if they don't off-shore your job.

But is it all worth it? I think so, that's why I do it, and the thing is the more competent you are then the less problems you will have. But it's also not an easy journey to take to get there.

Now maybe all of this sounds negative and I do apologise for that. Programming is lovely and you should try it and if you really like it then pursue it. But if you do some little course, you're not really programming. You got a taster of it. It's then up to you to decide whether to take it further. It'll be worth it but it will take awhile.

The creators of the video, I'm sure, would argue they're not asking for everyone to become a career programmer. But that's not true in my opinion. You don't really get to see anyone programming. What you mostly see are glamorous offices and happy people. Their web page shows you how much potential there is for filling all those programming jobs. It's clearly a drive for more employees. But if they think programming is so awesome (and it is, honest), then let's see some code. Show people what you're asking them to do. If that puts them off then maybe they're not up for it.

Taking on programming is a serious task. You'll be asked to invest a lot of time to learn and do the job so if you don't really love it then you might find it a bit soul destroying. I don't think it's too much to ask either for them to be a little more honest. Surely it doesn't matter because programming is fun and if you get on with it, you might not really care if you're shoved in a cubicle maintaining legacy code which is more likely to happen than scooting around your office eating free food.

So again, do feel free to try coding and pursue it if you love it. Just remember it's not all fun and games. It's a job and like any other job it's really only fun if you're passionate about it. Oh, and don't let your programming course go to your head and belittle your programming co-workers or you just might have to do his job too!

Basically my point is, I love it and I'd hate for people to go in with their expectations too high and come out thinking it sucks and look down on something which is genuinely awesome.

Posted by toadwarrior on 26 Feb 2013, 9:24 p.m.

Who wrote that code?

Without a doubt it seems no matter how hard you try to write code, if you go back to it a year later it will look like someone else wrote (someone who obviously isn't as good as you!). I've made some sensible changes to the codebase for this site which make my life easier.

There are more changes I'd like to make but they'll require database changes I'd not like to make on the last day of my Christmas holiday so maybe I'll get those another day.

Posted by toadwarrior on 7 Jan 2013, 5:53 p.m.