-
Stop Using the PHP Error Suppressor “@” and “or die”
Posted on August 28th, 2010 No commentsIt annoys me when I see tutorials for learning PHP with code like this: $fd = @ file ( "doesnotexist" ) ; and this: $md = mysql_connect ( "localhost" , "user" , "pass" ) or die ( "Could not connect!" ) ; It’s bad practice in the real programming world and shouldn’t happen. The at symbol (@) is used to silence any errors caused by calling a function as shown above, when proper error handling should be implemented. Similarly, the practice of using “or die” to error check needs to stop being taught.
Read the rest here:
Sphere: Related Content
Stop Using the PHP Error Suppressor “@” and “or die”
17, 5, Class, File, ICO, James, OS, PDO, Program, RDP, SQL, Top, Wordpress, ad, amp, art, asgrim, asgrim.com, at, catch, check, code, coding, csv, die, error, exceptions, fun, function, functions, handling, host, http, ice, image, images, in, include, ing, int, language, like, live, load, me, mysql, no, not, or, personal, php, press, programming, smile, stack, suppressor, symbol, to, tutorial, tutorials, ua, user, when, word, world, wp, www asgrim, catch, Class, csv, functions, hatred, image, language, php -
Adding Extra Security – Encrypting Passwords For Multiple Users
Posted on June 26th, 2010 No commentsAs many of you probably know, I’ve been working for quite some time on a project called Private Passwords . It is an online password management tool which stores your passwords for any site and allows you to retrieve them from anywhere in the world. One of the things that has niggled me for a while was the fact that the encrypted passwords were all encrypted using an AES encryption key , but had no real barrier if someone somehow managed to get hold of the AES key
See the article here:
Sphere: Related Content
Adding Extra Security – Encrypting Passwords For Multiple Users
17, 5, Brilliant, FAIL, IDE, James, Kelvin, Someone, ad, amp, art, asgrim, base, blog, busy, check, code, coding, company, data, database, decryption, e-mail, encrypting, encryption, exam, fact, form, forms, get, home, http, import, important, in, ing, int, key, less, mail, management, me, multiple, name, no, not, one, password, passwords, private passwords, project, security, share, site, solution, sw, system, time, tip, to, uk, user, username, when, word, work, world, www busy, check, forms, int, Kelvin, kelvin-at-work, key, password, private passwords -
Alton Towers Review 2010
Posted on June 14th, 2010 No commentsI’m doing absolutely everything I can to avoid the World Cup football. In doing so we ended up at Alton Towers (handily a 30 minute drive from Hannah’s mum’s) on Monday

See more here:
Sphere: Related Content
Alton Towers Review 2010
17, 5, ALA, Alton, Class, EU, IDE, James, OS, RDP, Top, Track, Wordpress, ad, air, amp, art, asgrim, asgrim.com, available, busy, car, cars, check, day, fact, first, form, forward, freyja, fun, get, hannah, http, ical, ice, image, in, ing, ini, int, key, lee, left, light, like, live, load, mash, me, name, named, new, no, not, one, parent, park, personal, ping, post, press, project, review, rides, share, smiling, something, sub, sw, table, theme, time, title, to, towers, trac, upload, vertical, warm, word, world, wp, www asgrim.com, cars, Class, ping, sub, table, tracking, vertical -
Question: How does source control work in a non-distributed environment?
Posted on February 5th, 2010 No commentsAt our company we currently all work on one shared network drive. The source code is not under any kind of source control, which for me is a big no-no. I’d love to be able to set up SVN and us all work of separate repositories and just commit back to a trunk or branch, but our tech manager doesn’t agree.
Continue reading here:
Sphere: Related Content
Question: How does source control work in a non-distributed environment?
17, CVS, Eclipse, File, James, OS, SVN, amp, auto, change, check, code, coding, commit, company, control, fine, form, http, ical, in, ing, int, issue, linux, me, network, no, not, one, open, open to suggestions, problem, repository, scm, share, solution, something, source, tech, to, tom, ua, update, vcs, version, windows, work before-it-takes, check, commit, linux, network, situation, source-control, tech -
MySQL gotcha when using non-compulsory foreign keys
Posted on January 27th, 2010 No commentsI’m just writing a query at the moment that filters out test records from a database. These records have a foreign-keyed value that identifies test apps, e.g. a table with: id name 1 TEST 2 ANOTHER_VALUE 3 SOMETHING_ELSE This is joined onto the main data table, sensibly with a query like this: SELECT * FROM the_data LEFT JOIN the_values ON the_data.some_value = the_values.id WHERE the_values.name != 'TEST' The gotcha is however, that this doesn’t work as you’d expect
Read more here:
Sphere: Related Content
MySQL gotcha when using non-compulsory foreign keys
17, Eye, IDE, James, SQL, amp, base, check, coding, data, database, filter, gotcha, http, in, ing, join, key, left, like, me, mysql, name, no, not, null, query, record, simple, solution, something, table, test, to, value, values, work amp, base, gotcha, identifies-test, instance, joined-onto, null, onto-the-main, query, record, simple, simple-once, table, work -
cURL Tips – HTTPS requests
Posted on December 15th, 2009 No commentsToo many times have I seen this in cURL clients: curl_setopt ( $ch , CURLOPT_SSL_VERIFYHOST , false ) ; curl_setopt ( $ch , CURLOPT_SSL_VERIFYPEER , false ) ; Why is this bad? You leave yourself totally open to man-in-the-middle attacks, and makes SSL virtually pointless. Sure the data passed between the two servers would still be encrypted, but there is no way of verifying the server you’re talking to is the server you WANT to be talking to! My recommendation is that you verify the server is genuine by checking against the genuine CA certificate in PEM format.
See original here:
Sphere: Related Content
cURL Tips – HTTPS requests
17, 5, BT, IDE, James, OS, Read, Top, URL, ad, amp, api, blog, cURL, certificate, change, check, client, coding, data, form, format, fun, function, host, http, https, in, ing, int, internet, less, like, me, name, no, one, open, php, problem, request, server, servers, site, ssl, talk, time, to, tutorial, ua, verifyhost, verifypeer, virtual amp, check, cURL, fwo, internet, leave-yourself, open, passed-between, php, problem, Read, talk, tutorial, verifypeer -
ctype_digit rtfm!
Posted on October 23rd, 2009 No commentsFor the last 5-10 minutes I've been wondering why a check on a variable which should be valid has been returning false. The check is ctype_digit, which returns true if all characters in a string are digits.
Read the original post:
Sphere: Related Content
ctype_digit rtfm!
5, Chris, FAIL, General, Google, OS, Plug, RDP, Search, Windows 7, Wordpress, ad, amp, applications, book, case, characters, check, click, code, ctype_digit, data, digit, digits, dodgy, double, email, exam, first, form, fun, function, hellip, http, ical, ice, impressions, in, ing, integers, mail, manual states, map, me, microsoft, no, not, php, place, plugin, plugins, post, posts, press, rant, rtfm, service, something, string, theme, title, to, type, valid, web, web development, windows, word, www cases-it-might, digit, dodgy, ing, integer-at-some, integers, map, php, place, Plug, windows, www -
The Importance of Configuring Stuff Properly
Posted on October 9th, 2009 No commentsToday I had a TOS Violation on my Linode VPS for sending spam e-mails. Odd I thought as I only have 1 mail user.
See original here:
Sphere: Related Content
The Importance of Configuring Stuff Properly
17, 5, Connection, IDE, James, OS, Top, ad, air, amp, anyone, apache, api, cd, check, coding, config, configuration, day, exam, fix, gap, get, hacking, high, highlight, http, ical, import, in, ing, install, issue, left, light, like, linode, mail, me, network, no, not, one, ping, post, postfix, problem, proxy, running, script, security, server, something, spam, squid, thought, to, vps, web, website, weeks, work, www air, api, check, config, exam, hacking, issue, network, postfix, spam, thought, vps -
Overriding Methods With Different Arguments
Posted on September 17th, 2009 No commentsSomething I was looking at in PHP today, and I was pretty sure of, but I’m putting here for future reference.
Read more from the original source:
Sphere: Related Content
Overriding Methods With Different Arguments
17, 5, Class, IDE, James, OS, ad, amp, arguments, case, change, check, child, classes, coding, day, error, exam, extends, fun, function, http, important, in, inherit, inheritance, me, method, new, no, not, object, oop, output, override, parent, php, prototype, question, simple, something, sw, test, to, trac, type check, child-method, Class, classes, does-the-child, inherit, override, php -
Eclipse, why do you make installing plugins so hard?
Posted on September 10th, 2009 No commentsEclipse PDT and Zend Studio are really nice editors for general use. Once they’re set up the way you want, they work mostly fine
See the article here:
Sphere: Related Content
Eclipse, why do you make installing plugins so hard?
100, 17, 5, Eclipse, General, IDE, James, Java, Manually, OS, Plug, Projects, Top, Zend, ad, amp, base, bug, check, code, coding, collabnet, development, editor, error, exam, extensions, face, fact, feature, fine, get, http, ice, in, install, interface, issue, list, me, mylyn, netbasic, network, no, not, one, pdt, php, plug ins, plug-in, plugin, plugins, project, software, solution, studio, test, to, type, virtual, when, work code, Eclipse, fact, mylyn-bridge, netbasic, plugins, project












































