Logic Gates made from Dominos
A good way to visualise these complex ideas.
Richard Bradshaw’s idea of what is interesting
A good way to visualise these complex ideas.
I was trying to import my tumblr blog into this blog using Wp-O-Matic. Unfortuanatly WP-O-Matic locked up the site with a Internal Error, whilst continuously pumping one post into this blog. Good work guys!
Luckily I guessed that simply deleting the plugin would fix things, which it did.
Conclusion? Don’t use WP-O-Matic!
An interesting view into how students live today. I’m thinking that it depends what degree you study on how much work and classes you have to do - 3 hours of class + 2 hours work a day is much less than I did, and I only graduated last year!
Also, noone brought laptops to lectures - we didn’t use Facebook all through lectures, the material was much to complex to do that and still pass.
Image via Wikipedia
Having talked to some university students who had taken computer science/IT degrees, I was amazed by how little they seemed to know about making anything that’s secure or even remotely logical. The group I met with primarily had been taught PHP. Having looked at some sites they were designing I realised 5 things that they had no idea they had done incorrectly, here’s a run down:
Why it’s bad: Unless you specifically set .inc files to be parsed as php they are readable by just browsing to that page. Not good if we are talking about files that include the database username and password.
Easy way to fix: Name your includes .inc.php or put them in a folder called includes, and name them .php
Harder way to fix: Put a file named .htaccess in the directory with your .inc files, and add this line:
AddHandler application/x-httpd-php .inc
Why it’s bad: Although being hammered by crackers would be an unusual turn of events, for a website it’s inevitable. Bots exist with the sole purpose of cracking websites in order to add redirects to malware or spam to the site.
I built a small ruby site once, just as a test to see how it all worked. It had a comment form. I didn’t worry about sanatising the input, as I didn’t link to this site anywhere. Within a week there were about 4000 comments, all linking to spam. Luckily I hadn’t allowed javascript in the comments, so there wasn’t any evil redirections or anything, but the point is clear. Your site will be attacked.
How to fix: Read up on SQL injection and Cross Site Scripting (XSS). Use the PHP function mysql_real_escape_string to santise anything you are going to put into a database. Don’t allow html tags in your users input. Try to crack your site yourself - how would you do it?
Why it’s bad: I’ve seen sites before that link to 3 or 4 javascript frameworks, often to allow fancy animations and the like. This is fine, but there is a lot of crossover between them - I don’t see why you need more than one. These frameworks are pretty large - downloading even one to provide a trivial feature is questionable, but linking 3 or 4 is just madness.
Also, the golden rule of programming: if you don’t understand what code does, you probably shouldn’t be using it! (Caveat: unless it’s Perl - no one understands that!)
How to fix: Learn how to use javascript properly, or just stick to one framework.
Why it’s bad: It makes things harder for you. Honestly.
Using a semantic design means that headers are tagged using the H1, H2, H3 tags, paragraphs use p etc etc. Don’t inline style your headers with a font size and a font weight to get them larger and bold - use the way it’s designed to help you!
Use classes sensibly. Don’t put your red title in a class called redtitle - when you redesign the site that doesn’t make sense. Call it subtitle or something that describes what it is, not what it does.
Moving on from the basics, consider using technologies such as microformats to help you - these describe the information on your site more fully.
How to fix: Always separate content from presentation. Seperate CSS style sheets from HTML pages. Think about what purpose a page element serves, tag it appropriately and then use CSS to format it.
Check what exists before you start. If you want to make a site, check out the existing tools: Wordpress, Joomla, Drupal etc. all have a head start on you - it might make more sense to take their code and design from there.
If you are using ajax, use a javascript framework - as new browsers come out with different support you can simply upgrade the framework rather than having to deal with these inconsistancies yourself.
Of course, if you are starting something totally new, a blank slate is often the place to start, but don’t waste time on work that doesn’t need to be done.
So, there you go - 5 things that I have definitely done before and hopefully some sound advice for people starting out.
Any further ideas, add them to the comments!
mysql_real_escape_string documentation
40 signs you really area lousy PHP programmer
Head over to this page to see the official download counter, with sub division by countries. Currently it’s in 670,000, with 9700 downloads per minute…
Here’s a new screenshot – shows seemic integration, not something I’m particularly excited about… Looks like it still has the scroll bug it used to have as well…
Web 2.0 … The Machine is Us/ing Us
Really interestingly made video, definitely worth watching!
Covers the history of the internet in a really creative way.
The new semantic search tool for wikipedia, Powerset, have just announced a competition challenging users to find interesting “Factz” using their search tool.
So far, I’ve found:
What eats humans?
We have the usual: zombies, monsters and sharks, but the list also includes Catholics, foxes, streets and pigs…
What do chickens like?
Only three things, potatoes, ham and tandoori. That’s good to know…
Image via Wikipedia
Google have released a section in the settings tab of Gmail called labs. This was predicted by a few blogs recently, and it seems to have come true today.
The new labs section includes:
These features are all rather random, but it will be interesting to see if anything more interesting appears in here.