HotCocoa!

Posted: February 4th, 2010 | Author: Joakim Andersson | Filed under: apple, ruby | No Comments »

The latest MacRuby with HotCocoa is amazing! Finally a way to write OS X applications without having to learn Objective-C.

require 'rubygems'
require 'hotcocoa'
include HotCocoa
application do |app|
  win = window :size => [100,50]
  b = button :title => 'Hello'
  b.on_action { puts 'World!' }
  win << b
end


Facebook’s HipHop Goes Public With a New PHP Runtime

Posted: February 3rd, 2010 | Author: Joakim Andersson | Filed under: programming | No Comments »

“Facebook said the results of using HipHop have been dramatic. CPU usage on Facebook servers has dropped by an average of 50 percent as the HipHop PHP engine reduced the load on Facebook’s infrastructure.”

Facebook’s HipHop Goes Public With a New PHP Runtime — Developer.com

The article isn’t that detailed but from the following quote:

“This is not an extension to PHP — this is pretty different,” Recordon said. “Right now, the process is once you build and compile HipHop, it comes with a tool that will go through the transformation process and output the binary, and that’s what you actually use to run it.”

And the fact that they’ve removed Apache and uses an own web server. I start to wonder if what they do is actually take the PHP source code and compile it to get one binary that is both the web server and the application in one.

PHP is an interpreted script language so what normally happens is that PHP takes the source file and reads it line by line as it’s executing it. If they’ve bypassed this step completely by pre-compiling the script file into machine code that would explain the reduced CPU usage.


Maker’s Schedule vs Manager’s Schedule

Posted: July 31st, 2009 | Author: Joakim Andersson | Filed under: programming | No Comments »

“One reason programmers dislike meetings so much is that they’re on a different type of schedule from other people. Meetings cost them more.”

Maker’s Schedule, Manager’s Schedule

A good article by Paul Graham.

Don’t disturb your programmers!


Snow Stack – CSS 3D Visual Effect with WebKit

Posted: July 22nd, 2009 | Author: Joakim Andersson | Filed under: programming | No Comments »

This video shows “Snow Stack”, a 3D CSS Visual Effects demo built with HTML, CSS Effects and JavaScript in the latest WebKit nightly on Mac OS X Leopard and Snow Leopard. You can try this out yourself by reading the details on www.satine.org.

Wow! This is mad impressive! And if it’s true that the graphics card is doing most of the work and the CPU is hardly loaded at all, it is borderline crazy!


Snabbare nyhetsförmedling

Posted: July 21st, 2009 | Author: Joakim Andersson | Filed under: programming | No Comments »

Det har varit långsamt att visa vissa sidor på ny.heter.se. Förra veckan så tittade jag i MySQLs loggfil för långsamma frågor och insåg att det är på grund av att jag gör uppslagningar med WHERE IN, ORDER BY och LIMIT begränsningar.

Dessa urvalskriterier medförde att MySQL inte kunde använda något av de tabellindex som finns utan fick göra en långsam filsortering för att få fram det slutgiltiga resultatet. Efter en del googling så hittade jag sidan Mysql query optimization for ORDER BY.. LIMIT queries där ett förslag var att prova med att förenkla databasfrågorna och göra sorteringen i den anropande koden istället.

Jag provade detta och resultatet är en otrolig prestandaförbättring! Att det dessutom är mer troligt att de cachade resultaten för de mindre databasfrågorna kommer att kunna återanvändas är ytterligare en vinst.

Så njut av snabbare svarstider på ny.heter.se, det enklaste sättet att läsa nyheter på!


Snabbare nyheter

Posted: June 9th, 2009 | Author: Joakim Andersson | Filed under: programming | 3 Comments »

De saknades index på två foreign keys i en tabell vilket gjorde de flesta SQL-frågor onödigt långsamma. Detta har jag nu åtgärdat, så ny.heter.se ska till allas glädje nu vara betydligt snabbare!


Java’s New G1 Collector Not For-Pay After All

Posted: June 6th, 2009 | Author: Joakim Andersson | Filed under: java | No Comments »

Slashdot Developers Story | Java’s New G1 Collector Not For-Pay After All

Back on track, but let’s see for how long…


How Software Engineering Differs From Computer Science

Posted: June 6th, 2009 | Author: Joakim Andersson | Filed under: programming | No Comments »

“cconnell sends in a piece he wrote for Dr. Dobb’s which ‘argues that software development will never be a fully formal, rigorous discipline, and the reason is that software engineering involves humans as central to the process.’”

Slashdot Technology Story | How Software Engineering Differs From Computer Science


Java Gets New Garbage Collector, But Only If You Buy Support

Posted: May 31st, 2009 | Author: Joakim Andersson | Filed under: java | No Comments »

Slashdot Technology Story | Java Gets New Garbage Collector, But Only If You Buy Support

I doubt this has anything to do with the Oracle deal which means that they had planned to go in this direction before. Maybe I’ve just missed it? But I find it a troublesome development that some features of Java would be limited to those that pay for them.


Google Wave Developer Preview at Google I/O 2009

Posted: May 29th, 2009 | Author: Joakim Andersson | Filed under: programming | No Comments »

Google Wave looks quite sweet!