Ads

Wednesday, August 05, 2009

How the web should look, DPRK style (which happens to be sort of right)

So the Korean Central News Agency has a interesting website. I actually like how they do news. Very webless like. For example, probably best Clinton saves Reporters news of the day.

Arrival of Clinton
Meets with Clinton
Dinner with Clinton
Clinton Leaves
The summary


Just the news, no javascript, no ads.

Nice.

Ha, and it has more information than I could get from other sources, which just wanted to talk about opinions about what it all meant.

Monday, August 03, 2009

First class functions

First class functions are very useful.

In some code I wrote, the graphs needed to be plotted with linear scaling on both axes and also with the abscissa linear and the ordinate log. Neat thing is, I can pass in the plotting function to use to the code, then have it use that function. I can test which function was passed in and change some settings that are used to generate ideal case lines that look right in each graph.

Anyway, it makes your life easier some times, so give it a try!

Sunday, August 02, 2009

Decline of racial profiling

http://ac360.blogs.cnn.com/2009/07/30/the-decline-of-racial-profiling/

I originally heard about this research at a talk at work. It was sort of cool how they did the analysis, because you can't really setup an experiment to test a hypothesis. You have to create one later from the existing dataset that can stand up to analysis.

So to make it the same time of day, they used a time that was dark part of the year and light during the other part. Daylight savings time helped out alot with that. Assuming that when it is dark you can't tell the difference between people (which you can't), then you can compare when they can tell race and when they can't.

I prefer this sort of data analysis to the anecdotes like in the comments. I am sure that some racial profiling exists, but it is shown to not be a rampant epidemic from the numbers. Some people suggest it is everywhere from a gut feeling which turns out to be false. (Calling you out, Obama!)

Saturday, August 01, 2009

Coding styles

So, on the shower time thoughts, I figured out what I was going to blog about today.

I was contemplating on some code that I wrote/am writing for work. I started out doing a good job with creating new functions to do stuff that I do over and over and planning out how it will look. As I got into the phase where I was just implementing it, and not really doing design, I got sloppy and made these huge functions that were a whole heck of spaghetti.

So, I was remembering factor and other concatenative languages. Neat thing is, if you want to take something and make it a function/word, a good editor can let you just highlight it and hit some sort of "make function/word with name ___".

Seems like something I could have used. No good plotting library that I could find quickly though, so factor will have to wait. Going to give Common Lisp a fair shake first. (though now I am seeing why some people like LISP-1 (ala Scheme with the unified namespace), keeping track of types for something, even if that something is a function isn't completely necessary). I don't know about plotting for it either, I might just start using gnuplot and have my code create outputs that I pipe to gnuplot.

Anyway, the main thought was that its easy to get sloppy as you go along developing code. My computations are pretty clean (or so I think), but the graphing part is a bunch of ugly. Some of that is because I am learning the nuances of the matplotlib api, but eh. I ended up embedding calculation/transformation code in with the plotting, which is sometimes hard to keep straight. Not going to really fix it, I don't have time, but I'll try and keep it in mind next time. Keep stuff separate if you can!

I realize this post makes no sense and doesn't have any real content.

sorry about slacking

I keep coming up with interesting things to put in the blog, but I am normally in the shower.

By the time I get out, I have changed topics in my head and forget it.

Sunday, July 26, 2009

surfing big waves

I tried surfing some big waves last friday. I was not qualified. I could barely get out past the break. Huge rip current, so that sucked too.

I did manage to actually "surf" though, cuz the wave had so much energy I couldn't really screw it up. Once I hit someone (sort of, I ended up pushing their board away), because the wave took me with it, even though I wasn't trying to catch it.

Earlier in the week was awesome, we saw dolphins out in the water surfing with us. That was really cool, I spent some time just watching them, instead of trying to surf.

disdain

so, I learned today that disdain is spelled with a d, and not a "st" as I normally pronounce it.