ARTLUNG
this is the website of joe crawford. code. occasional comics. toy robots. san diego.

ArtLung posts tagged with “programming” ·


  • Transitions
    This week, my hosting company, Pair.com, will be making several upgrades to the machine I host with. The biggest transition is that my sites will now be running under PHP5 instead of PHP4. Yesterday I upgraded the blogs I maintain to the latest and best version of WordPress — version 2.2.3 — and for the…
  • Turn off Magic Quotes in PHP via .htaccess
    #.htaccess SETTINGS TO TURN OFF # STUPID MAGIC QUOTES IN PHP # I HATE MAGIC QUOTES PROBLEMS php_flag magic_quotes_gpc off UPDATE: See Magic Quotes, and note: This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 6.0.0. Relying on this feature is highly discouraged.

  • WordPress 2.1 Ate My Blog
    I can see the posts in the database, but something went wonky on the upgrade and everything before the upgrade is invisible. Woe is me till I find the time to fix it. Please stand by. I’m asking about it on the wp support forum. Update: And we’re back. The way I fixed it: running…
  • Help me think in MVC
    Dear LazyWeb: I discovered the Model-View-Controller pattern earlier this year. Well, not discovered, I had read about it in OO programming articles years ago. And it’s been around for decades. But this year I think I’m finally getting it. I think the reason I never got it was because I’d never encountered a system that…
  • MySQL Archaeology
    When I was first playing with databases I was putting lots of stray stuff into mine. It was pretty fun, actually. mysql> select want_id, artist, title from music_wanted; +———+———————–+——————————–+ | want_id | artist | title | +———+———————–+——————————–+ | 0001 | Anderson, Laurie | Mr. Heartbreak | | 0002 | Cocker, Joe | Greatest Hits |…
  • My First Python Program
    Here’s my hello world moment for the programming language Python: #!/usr/local/bin/python print “Content-type: text/html\n” print “hello” if 1 == 0: print “1 is 0” else: print “1 is not 0” print “” print “word “*10 Which results in hello 1 is not 0 word word word word word word word word word word Expect more…
  • Web Programming as Cop Shows
    As my pal Matt Lee (Sassy) says: We are dorks. Read it
  • CDONTS Mail
    Although it’s being deprecated, this article on CDONTS Mail is worth me mentioning so I can find it in the past.
  • Mmm, SOAPy
    Lots of interesting chatter about SOAP, XML, APIs, and Web Services right now: Google’s Gaffe (this article asks if Google’s API is overly complicated by SOAP) SOAP Wars (the converse take) The always interesting Shirky with another take on Web Services/APIs SOAP vs. REST (Representational State Transfer) REST and Web Services Some interesting reading. Though…
  • geek out!
    this code is equivalent between postgresql and mysql: mysql: create table crawford_addresses ( id int(10) auto_increment primary key, … ); postgresql: create table “crawford_addresses” ( id serial , primary key (“id”), … );