KBD

Keith Devens .com

Saturday, March 20, 2010 Flag waving
Less isn't more; just enough is more. – Milton Glaser

Tag: Programming

Children:

Page 1 →

Daily link icon Wednesday, July 29, 2009

  1. Django 1.1 release notes. Django 1.1 is out, yay. ~

       (0) Tags: [Django]

Daily link icon Sunday, July 12, 2009

  1. John Resig - HTML 5 Parsing ~:

    What's interesting about this particular implementation is that it's actually an automated conversion of Henri's Java HTML 5 parser to C++. This conversion happens automatically and changes will be pushed upstream to the Mozilla codebase.

    Normally I would balk at the mention of a wholesale, programmatic, conversion of a Java codebase over to C++ but the results have been very surprising: A 3% boost in pageload performance.

    When I finally get my new Django-based site running I'll switch my markup over to HTML5 Smiley

       (0) Tags: [Django, HTML, Mozilla, This website]

Daily link icon Wednesday, July 8, 2009

  1. up and running with cassandra :: snax ~:

    Cassandra is a hybrid non-relational database in the same class as Google's BigTable. It is more featureful than a key/value store like Dynomite, but supports fewer query types than a document store like MongoDB.

    Cassandra was started by Facebook and later transferred to the open-source community. It is an ideal runtime database for web-scale domains like social networks.

    This post is both a tutorial and a "getting started" overview. You will learn about Cassandra's features, data model, API, and operational requirements—everything you need to know to deploy a Cassandra-backed service.

       (0) Tags: [Databases, Twitter]

Daily link icon Saturday, July 4, 2009

  1. Holy shit trying to get MySQL support for Python working on Windows is a huge headache. WTF.

       (0) Tags: [MySQL, Python, Windows]

Daily link icon Tuesday, May 26, 2009

  1. Seriously considering switching my site over from PHP to use Python & Django.

       (1) Tags: [Django]
  2. Advanced Topics in Programming Languages: Concurrency/message passing Newsqueak, by Rob Pike (comments on LtU and from Patrick Logan). To watch. ~

       (0) Tags: [Programming]

Daily link icon Monday, May 25, 2009

  1. HowtoForge - Linux Howtos and Tutorials.

       (0) Tags: [Unix]

Daily link icon Friday, May 22, 2009

Key value stores

Been running across a bunch of stuff about key/value stores lately, so I figured I'd keep track of the trend.

In this article I'll explain the design and the implementation of a simple clone of Twitter written using PHP and Redis as only database. The programming community [looks at] key-value stores like special databases that can't be used as drop in replacement for a relational database for the development of web applications. This article will try to prove the contrary.

Daily link icon Tuesday, May 19, 2009

  1. The Little Manual of API Design (PDF) (via).

       (0) Tags: [Programming]

Daily link icon Tuesday, May 12, 2009

  1. Douglas Crockford on JavaScript: The Good Parts (via).

       (0) Tags: [Javascript]

Daily link icon Tuesday, May 5, 2009

Coding pet peeve

Coding pet peeve:

if(condition)
  variable = true;
else
  variable = false;

Just say:

variable = condition;

Daily link icon Monday, May 4, 2009

  1. Conversations with the Creators of Major Programming Languages | Lambda the Ultimate.

       (0) Tags: [Programming languages]

Daily link icon Thursday, April 30, 2009

  1. High Performance Web Sites :: Loading Scripts Without Blocking (via).

       (0) Tags: [Javascript, Web Development]

Daily link icon Tuesday, April 28, 2009

  1. James Tauber : Thunks, Trampolines and Continuation Passing (via).

       (0) Tags: [Python]
  2. Neopythonic: Final Words on Tail Calls.

       (0) Tags: [Python]

Daily link icon Friday, April 24, 2009

  1. Perlgeek.de Blog :: What you can write in Perl 6 today

       (0) Tags: [Perl]
  2. A Curious Course on Coroutines and Concurrency in Python, by David Beazley (via).

       (0) Tags: [Programming, Python]

Daily link icon Thursday, April 23, 2009

JSON in .NET 3.5

.NET 3.5: JSON Serialization using the DataContractJsonSerializer. Very helpful article.

However, Microsoft's built-in JSON serialization doesn't even serialize the built-in Dictionary class in a useful way.

var foo = new Dictionary<string,string>();
foo.Add("one", "uno");
foo.Add("two", "dos");
var json = new System.Runtime.Serialization.Json.DataContractJsonSerializer(foo.GetType());
var stream = new MemoryStream();
json.WriteObject(stream, foo);

Console.WriteLine(Encoding.UTF8.GetString(stream.ToArray()));

gives:

[{"Key":"one","Value":"uno"},{"Key":"two","Value":"dos"}]

Idiots.

Edit: FWIW, the reason behind it is that Microsoft wrote their JSON serialization as a half-assed subclass of their XML serialization, so it thinks everything's an "infoset". Infosets don't have associative arrays, hence their representation of one as an array of key value pairs.

JSON is kind of an important technology, and Microsoft allocated one day of a programmer's time to half-ass it into the .NET class libraries.

Daily link icon Wednesday, April 15, 2009

  1. Firefox is a memory hog, and leaks like crazy. Switch to Opera? Chrome?

       (1) Tags: [Firefox]

Daily link icon Tuesday, April 14, 2009

  1. Interview with Arthur Whitney in ACM Queue (via).

       (0) Tags: [K, Programming]

Daily link icon Monday, April 13, 2009

  1. "Protovis is a visualization toolkit for JavaScript using the canvas element." (via).

       (0) Tags: [Javascript]
  2. Visualising Sorting Algorithms (via).

       (0) Tags: [Computer science]
  3. Ned Batchelder: C# and OutputDebugString:

    Debugging UI code is a pain because if your debugger obscures the UI, then exposing the UI causes window messages, which change the behavior of the code, or trip more breakpoints, and so on. So I'm using printf-style debugging: printed messages in key points to understand what's going on. Here's some tips on how to do it.

    Incidentally, I never realized that using dual monitors would prevent window messages from being fired upon switching back and forth. I've never been fond of dual monitors, but that's an actual practical reason to use them.

       (0) Tags: [C#]

Daily link icon Tuesday, March 31, 2009

  1. Ned Batchelder: A Whirlwind Excursion through Python C Extensions

       (0) Tags: [Python]

Daily link icon Friday, March 27, 2009

  1. Via /., via Ars Technica, Google is working on a project named Unladen Swallow that compiles Python down to the LLVM JIT compiler infrastructure. The project has the potential to give Python massive performance gains and language improvements.

       (0) Tags: [Python]

Daily link icon Thursday, March 26, 2009

My favorite feature of Eclipse that no other IDE has duplicated

My favorite feature of Eclipse that no other IDE has duplicated is its ability, when your cursor is on an identifier, to instantly highlight where else that identifier is mentioned.

You can click on a variable and be able to see at a glance where else the code uses that variable. It's super handy for learning the flow of code and I wish Visual Studio had the feature.

Daily link icon Monday, March 23, 2009

  1. Patrick Michaud (re)wrote an RPN calculator in Perl 6. Perl 6 is so cool.

       (0) Tags: [Perl]
  2. Parrot 1.0.0 "Haru Tatsu" Released! (via). Wow, I didn't even realize they were close to 1.0. Here's hoping Perl 6 won't be too far behind. I'm really looking forward to it. I think it's going to be a very fun language to program in.

       (0) Tags: [Perl]

Daily link icon Monday, January 12, 2009

  1. Slava Pestov: Java 7: too little, too late.

    It's 2009 and only now they're adding APIs to work with symbolic links, and move and copy files? And no closures? What a joke.

       (0) Tags: [Java]
  2. Factor: a practical stack language: Advantages of concatenative and stack-based languages

       (0) Tags: [Programming languages]
Page 1 →
March 2010
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
28293031 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 2 posts

Recent comments XML

I hate ASP.NET

I hate ASP... I was doing wonders​with PHP, then suddenly one of my​clients...

Johnies: Mar 17, 6:14am

Quantum physics and free will

I knew you were going to say that....

Tom Massey: Mar 15, 9:26pm

Generated in about 0.16s.

(Used 13 db queries)