Tue 5 Feb 2008
WTF/M - best code review stat ever
Posted by dkaz under Programming
No Comments

So damn funny, yet so damn true.
Tue 5 Feb 2008
Posted by dkaz under Programming
No Comments

So damn funny, yet so damn true.
Thu 1 Nov 2007
Posted by dkaz under Programming
[3] Comments
Found in Apache logs…on a domain that doesn’t even have MySQL installed…
85.17.155.21 “GET /phpmyadmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /myadmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /PMA/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpmyadmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/sysadmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/sqladmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/db/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/web/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/pMA/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/mysql/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/myadmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/webadmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/mysqladmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpmyadmin2/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin-2.2.3/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin-2.2.6/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin-2.5.1/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin-2.5.4/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin-2.5.6/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin-2.6.0/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin-2.6.0-pl1/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin-2.6.2-rc1/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin-2.6.3/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin-2.6.3-pl1/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin-2.6.3-rc1/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /db/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /web/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /PMA/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /mysql/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /myadmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /mysqladmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /mysql-admin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpmyadmin2/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin-2.2.3/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin-2.2.6/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin-2.5.1/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin-2.5.4/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin-2.5.6/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin-2.6.0/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin-2.6.0-pl1/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin-2.6.2-rc1/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin-2.6.3/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin-2.6.3-pl1/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin-2.6.3-rc1/main.php HTTP/1.0″ 404 - “-” “-”
Thu 24 May 2007
Posted by dkaz under Linux, Programming
No Comments
Little know seq (sequence) utility is a great way to loop on a range of numbers in Linux. It came in very handy today and will hopefully stick in my brain in the future.
for i in `seq 1 10`
do
..
done
Wed 16 May 2007
Posted by dkaz under Java, Programming
1 Comment
Amusing use of the ternary from our codebase..
log.debug( ( randomize ? "R" : "Not r" ) + "andomizing content" );
:)
Tue 3 Apr 2007
Posted by dkaz under Java, Ruby, Python, Programming
No Comments
Facebook development team has open-sourced their light-weight, cross-language development platform, Thrift.
I played around it with it for a while and it looks interesting enough, but I don’t have an immediate need for it.
Check it out if you have a cross-language environment Thrift currently supports C++, Java, Ruby, Python and PHP - a list that should satisfy most everyone.
A POSIX-compliant *NIX system is a requirement, but I’d be curious if it’s possible to get it up n’ running inside of Cygwin (as a development-only exercise, of course).
Mon 12 Mar 2007
Posted by dkaz under Linux, Programming
No Comments
I discovered a large gap in my bash kung fun today - I had no idea how to loop on lines of data in a file.
It turns out that “while data” pulls off this trick quite nicely:
while read myline
do $myline
done < inputfile
Fri 26 Jan 2007
Posted by dkaz under Java, Programming
No Comments
I haven’t been using “traditional” singletons for a couple of years now (Spring craze and all), so the Initialization On Demand Holder idiom, which allows for lazy instantiation of singletons, has escaped me until now.
private static class LazySomethingHolder {
public static Something something = new Something();
}public static Something getInstance() {
return LazySomethingHolder.something;
}
Here’s the explanation, courtesy of Bill Pugh, Brian Goetz and friends.
Found via TheServerSide.
Wed 17 Jan 2007
Posted by dkaz under Linux, Programming
No Comments
I was sick of typing in username/password for each login (I’m currently working on XP, deploying to a Linux-only env), so I finally went through the pain of following the steps here and set up PuTTY/Peagant public key authentication.
It was a relatively painless setup process, but here are a couple of things to keep in mind when going through it:
Sat 6 Jan 2007
Posted by dkaz under Linux, Programming
1 Comment
Register is running a great story about how Bill Joy created vi.
Apparently, vi commands are cryptic because they were optimized for Bill’s 1200 baud connection.
For additional entertainment, you can read Reddit’s discussion of the article here - complete with (always entertaining) emacs/vi mud-slinging.
Mon 1 Jan 2007
Posted by dkaz under Programming
[2] Comments
Can you find a friggin’ login link on http://www.tadalist.com/ or http://backpackit.com/?
It’s almost a joke.
Why can’t the self-proclaimed gurus of UIs figure out that their users want to SIGN IN some of the time AND NOT STARE AT FULL-PAGE ADS on home pages?
Thu 21 Dec 2006
Posted by dkaz under Java, Programming, Windows
1 Comment
I was writing a multi-line batch script with multiple call-outs to Ant and I was confused when it kept exiting after the first call-out.
I’m proud to be rusty at batch scripting, so I’m not ashamed to share the (obvious) fix…
To run a batch program from within the current batch program, use the call command followed by the name of the batch program you wish to run. After the second program is finished, it will return to the command which follows the call command.
If you invoke a batch file without using the call command (from within a batch file that is), control passes over to the new batch program and does not return.
Fri 15 Dec 2006
Posted by dkaz under Python, Programming, SQL
No Comments
I’ve lost most of my respect for Aaron Swartz over this password debacle.
See more coverage here: Never store passwords in a database!