Tuesday, 3 April 2012

5 ways to get around "programmers block"

It has happened to us all.

Everything is going swell. Your program is shaping up great. You are writing line after line of good code, almost on autopilot - then BAM. How do you go about doing that? Let's try using gotos instead of a for loop... nope, that's not worked. How about loads of if loops instead of that switch... nope, not compiling. After a while, this can get really frustrating, and make you feel like giving up. I call this programmers block.

5) Google, THEN ask
Try googling the error code you get, or google a certain function. Look at the first two pages of search results, and if you can't find what you are looking for, THEN ask. I cannot emphasize how important it is to properly search before you ask and waste someones time. If you fail to google properly, you will annoy everyone and just get loads of lmgtfy.com replies. A good website to ask for help is http://stackoverflow.com/ - the community over there is really friendly.

4) Get inspiration
Go to freecode.com or pastebin.com and search for a program that is similar to yours, or has an interesting way of doing a certain thing. Remember, never copy and paste code. You will not learn from this, and next time you come across a similar problem you will become stumped again.

3) Rewrite the program a different way
This can be a frustrating option, but sometimes its the only way. Sometimes you don't have to rewrite the whole program, but instead re-structure it.

2) Get some sleep
This suggestion may seem a little bit strange, but studies have shown that sleeping can help you make decisions. Just sleep, or even forget about the project for a few days - when you next come to the project you may find a solution that has been strikingly obvious, but you never thought about it.

1) Learn more
All programmers are still learning, even the really experienced ones. Read about more functions and library.I recommend buying a book about the language you are writing in above guides on the internet. The books are usually higher quality than a .pdf on the internet as anyone can write a .pdf, but a book must be of a certain standard to be published. Also, you can read a book anywhere, but need a to be in front of a computer to be on the internet.

It is really important that you don't give up. You will feel good once you have beaten programmers block, and it will prove a valuable learning experience for future encounters.

Thanks for reading :)

Monday, 2 April 2012

IM spammer

Sup :) This has got to be the most difficult program I have ever written.It is an Instant Messager Spammer that I wrote quite a while ago. It took me many hours and questions on stack overflow. Its worth it though, because usually the harder and more time consuming a program is, the more satisfaction you get at the end. Oh yeah, and a spammer is really funny, I almost crashed one of my friends computers while spamming him.

I tried to use some C style writing for this one, as I thought it would be good practice. My dad had an old book about C (He doesn't program, I have no idea why he had it), and after a few minuets reading I thought I should probably practice some. It took some adjustment to get used to things like "scanf" and "printf" instead of "cin <<" and "cout >>". The TypeMessage() function was the most difficult to write, but then again it is the main part of the program.

Anyway, yeah, check out the source code at http://pastebin.com/8iry9xEk. You can download it in the downloads section, along with source codes and descriptions for my other programs.

Thanks for reading :)

PS. We have a twitter account. Follow @teenprogramming. Thanks :)

Sunday, 1 April 2012

What is 'the cancer that is killing /b/'?

Every day, patriotic 'oldfags' complain about 'newfags' ruining 4chan's random board. Anything that contains a meme or a smiley face will cause a shitstorm of people posting "Back to reddit". In fact, /b/ has been redesigned to curb shit posting, and 'bring /b/ back to its roots'. Now, you cannot change your name, and you have an ID within a thread. Of course, this didn't change anything, and /b/ is still full of ponies and rage comics.



But are bronies and Redditors really killing /b/? No. The people who are killing /b/ are people who have been lurking the site for a few months and consider themselves oldfags. For some reason, wasting years of your life on that image board is seen as a good thing in the 4chan community, and if you haven't spend days in the basement on /b/ then you are an outcast. Anyway, /b/ has turned into an oldfag pissing contest, with people leaping at the chance to prove how much of their lives they have spend on the site.

Oh yeah, and bronies.