about | contact | rss
programming  
 
  Multibyte CSV Parser

I recently had to write a PHP CSV parser for a project, and found the built-in fgetcsv function fairly useless for real-world CSVs (where some fields are quoted and some aren't for example, or where escaped delimiters or quotes are present inside the field text).

Click here to continue reading this entry...
 
 
Posted by sasqwach at December 20, 2008 9:33 PM | Permalink
 
  Pejorative programming

sasqwach says:
interesting
sasqwach says:
"im a bad programmer" in google reveals 4 search results
davo says:
only 4?
sasqwach says:
"is a bad programmer" in google gives 123
sasqwach says:
noting programmers are largely pejorative and not modest
davo says:
lol pretty much sums it up
davo says:
hmm but "I'm a bad programmer" brings up 77 results on microsoft search
davo says:
"Is a bad programmer" = 243
davo says:
therefore google programmers are either better or more conceited than microsoft programmers
 
 
Posted by sasqwach at November 8, 2008 5:31 PM | Permalink
 
  Handy Book

51UyL00FYPL.jpgHaving not programmed in PHP for a good while but still knowing the basics, I was looking for a book that wasnt going to teach me from the ground up or wasnt going to dive into advanced abstract theory.

I confess I'm a O'Reilly fan basically for the geek factor and kudos you get from having a set of them on your desk, but hey.... Psssst wanna know a secret ? Most of them aren't actually that good!

There I said it, I feel a bit bad about it, but its true. Sometimes having an O'Reilly Java book on your desk looks good, but the book itself and your abilities might suck. People still go "ah-ha your an O'Reilly guy eh ?"  thinking you have things like "ability", "talent" or "genius".

That aside, This is a good book. I've found it perfect for jumping back into the world of programming with real life problems, examples and solutions.

Now to collect the set !



 
 
Posted by sasqwach at December 3, 2004 8:01 PM | Permalink
 
  The only command you'll ever need

mb_convert_encoding seems to be the command I'm using the most at work just now, I've programmed PHP for 5 years before and its the first time I've heard of it, then again I didn't write applications in another language for 5 years either....

<?php
/* Convert internal character encoding to SJIS */
$str mb_convert_encoding($str"SJIS");

/* Convert EUC-JP to UTF-8 */
$str mb_convert_encoding($str"UTF-8""EUC-JP");

/* Auto detect encoding from JIS, eucjp-win, sjis-win, then convert str to UCS-2LE */
$str mb_convert_encoding($str"UCS-2LE""JIS, eucjp-win, sjis-win");

/* "auto" is expanded to "ASCII,JIS,UTF-8,EUC-JP,SJIS" */
$str mb_convert_encoding($str"EUC-JP""auto");
?>

Just look at those conversions go !

=)


 
 
Posted by sasqwach at December 1, 2004 8:19 PM | Permalink
Recent
articles - 4
books - 7
comedy - 8
comics - 2
culture - 20
food - 10
gaming - 10
living - 18
media - 4
music - 9
parody
programming - 4
sex - 3
study - 9
tech - 7
toys
travel - 13
tv & film - 7
work - 11
Archive a
3 8 7 6 4
5 5 5