Middle Eastern Language Patterns

I dropped cable TV a few years ago, and when I finally got a Roku I started getting some news again. Watching the Arab Spring on CNN International last year, and tuning into Al Jazeera English at any time, I’ve noticed that interviewees from the Middle East tend to use many more analogies than Western speakers. These news channels interviewed folks from all walks of life all over North Africa, and out to Afghanistan, and I noticed this pattern regularly.…

Read more »

PHP: The Right Way

There are a lot of pitfalls to using PHP, and they bite new users quickly. “Spot the vulnerability” is a cool site which highlights examples of these pitfalls: http://spotthevuln.com/ (BROKEN NOW) Of course, PHP is a pretty speedy way to develop any type of server-side web code. Josh Lockhart has put together a list of best practices for PHP development and tailored it to new PHP developers: http://www.phptherightway.com/ If developers would follow the recommendations in the databases section it would take care of so many vulnerabilities out there today.…

Read more »

Simplify Your Writing

Chapter 5 in Godel, Escher, Bach, section Recursion in Language, has a great example of how my writing needed to be simplified for technical writing. It describes how asides in writing, created by commas and parentheticals, are similar to pushing and popping the writing’s context to a stack. There is always a way to simplify that writing, it suggests. Pretty smart……

Read more »

Advanced SQL Injection

Ok, here’s a great blog post by Chris Shiflett about a crazy-creative SQL injection technique: http://shiflett.org/blog/2006/jan/addslashes-versus-mysql-real-escape-string Very cool. His technique relies on tricking addslashes into breaking up a two byte character with a slash, creating a valid two byte character followed by a valid one byte character. He mentions that this (specific attack) is impossible with UTF-8 because all two (or more) byte characters have continuation bytes that start with 0b10.…

Read more »

"Yoda" Conditions

Here’s a creative idea I’d never considered before. I’ve written code like this, but accidentally, and then it looks wrong so I change it back. Here’s a quick example: if ( 42 == myInt ) as opposed to if ( myInt == 42 ) The former may be better to use because occasionally we all forget to put that second “=” in there, and we accidentally turn our comparison operator into an assignment operator.…

Read more »

LCD Modules

I’ve never built anything with an LCD on it before, but it seems like it’d be useful. Here’s some good info on creating an project with an LCD and an Arduino: http://arduino.cc/en/Reference/LiquidCrystal It’s a library of functions that make it very easy to work with the LCD controller. The controller has to be compatible with the HD44780 controller’s instruction set, but that’s basically an industry standard. Mouser has a selection of 20x4 character displays:…

Read more »

CSS / Div Tag Webpage Layout

Posted on

http://960.gs/ 960 Grid System seems like a great, easy way to setup the layout of a webpage using modern HTML and CSS techniques. Very cool. http://www.blueprintcss.org/ Blueprint CSS is also something to check out.…

Read more »

MinGW and Cygwin to build a Windows DLL

I was writing C++ in Linux - gvim + aterm is my development environment of choice. I needed to turn my code into a Windows DLL, though, and the following webpage was really helpful. http://www.mingw.org/wiki/sampleDLL I installed Cygwin in a Windows XP virtual machine, used Cygwin to install MinGW, modded my code and Makefile a bit based on the samples on that page, then ran “make windows” in that virtual machine.…

Read more »

C++ FAQ

Posted on

Marshall Cline’s C++ FAQ is great - very comprehensive. It covers topics useful to everyone from beginners to intermediate/advanced users. It’s at: http://www.parashift.com/c++-faq-lite/…

Read more »

Hooking Netfilter with a Linux Kernel Module

Posted on

http://www.linuxjournal.com/article/7184 This is a great Linux Journal article where they write a kernel module to hook Netfilter. It’ll probably be useful to me at some point. What other things in the kernel can be hooked? I’m sure the list is freakin long, but this would be fun to experiment with.…

Read more »