programming

Random Interesting Questions on StackOverflow #1

Code is up for the om-web-pack

I forked the cl-web-utils and oauth2 libraries and started work on a Twilio API.

You can check out the whole project here: https://gitorious.org/om-web-pack

As a change of pace I'm using LispWorks Personal Edition in Windows 7 (64-bit). I've already encountered a compilation error in cl-web-utils. It has to do with the helpers file which has some useful macros and functions, however most of them don't seem to be used and I feel like some of them can be inlined or replaced with functions from Alexandria or another library. We'll see what happens with that.

The changes I'm making to oauth2 are mostly improving the examples and documentation and testing it with a few more APIs like Twilio.

Node.js and Web Server Architecture Performance

Since I got an ACM subscription, I have been interested in knowing what research papers have practical implications for web developers. There was a blog post by Ted Dziuba that blasted the hype surrounding Node.js, calling it a cancer on the developer community and suggesting that the performance is sub-par and the language used, JavaScript, contains flaws as bad as those found in PHP. He did a micro-benchmark and the amount of requests that Node.js could handle with the simplest function and with a modest load was tiny.

HackTO hackathon aftermath (raw notes)

These are the raw notes I wrote down after I left the hackathon...You can check out the code I wrote here

completed some sort of application for the hackathon, was screwed over by the Wi-Fi routers. Discovered flaws in oauth2 and cl-web-utils packages. Drakma wasn't bad, needs more examples and a bit more documentation for the major functions.

HackTO hackathon, 14 April 2012

Quebec City Park

I've signed up for my first ever hackathon, HackTO. The last time I competed in something programming-related was over 3 years ago when I tried some single round algorithms matches on TopCoder. I also tried some of the puzzles in Google's challenge, whatever it's called. My skills are fairly average sadly.

I'll be coding using Common Lisp.

Designing Great (GNU) Docs

James Yu has written a blog post titled "Designing Great API Docs" on a company blog and it was interesting to see what kind of advice it had. The post suggests that multiple guides should come with the API documentation because when it stands on its own, it is much harder for someone to learn how to properly use it. If all you see are methods and classes, it can be difficult to figure out the flow of the code.

Defining a Contracts language for PHP

I'm trying to design a Design By Contract library for PHP5 and I have been looking at implementations in other languages. What I have noticed is that each implementation defines a contracts language. This should have been obvious to me, and I guess that it was though I overlooked this and was more interested in the meta-programming in PHP problem. So with this contracts language, we need to be able to specify the pre- and post-conditions for functions and methods, and we need to be able to specify constraints such as $x is one of (1,2,3) or $y is a string or null.

Covered in this post are:

  • Contracts and meta-programming
  • Racket contracts
  • Perl contracts
  • Java contracts - C4J
  • Java contracts - cofoja

Neat Example from another Common Lisp Book


I received the 2nd Common Lisp book that I ordered yesterday. Apparently it isn't the greatest book, but so far it isn't too bad. I really like that it, like the other book, has problems and exercises for students of the language to solve. One of the chapters covers string/character manipulation. In it, the book asks the student to implement a spell-checker and outlines four cases that need to be handled in order to find a misspelled word in the dictionary. The cases are: transposition, insertion, removal, replacement. Peter Norvig, a famed Lisp/AI programmer who works at Google, implemented a spell-checker in 21 lines of Python and this book has given me the idea that it's fairly straight forward to do.

Drupal 2011 Toronto session: site performance

Drupal 2011 Toronto Logo

The Site Performance: Optimization and Scalability session at the Drupal Toronto 2011 was good and it covered some basic things that many people may forget to do when deploying a Drupal site. I learned that the default logging method seems to be dblog which logs straight to the database which can heavily impact performance.

Subscribe to RSS - programming
© 2010 Your Name.. Drupal theme by Kiwi Themes.