 |
|
 |


 |
|
 |
 |
 |
 |
|
 |
 |
So I just discovered SQLite. It's a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine. Totally sweet, right? That's perfect for when you want to write a desktop app that would really benefit from an sql database backend... And guess what? It's public domain. Completely free. But don't get too excited. It's a C library and everybody cool uses C# these days. So we're out of luck, right? NOPE! There's an equally sweet ADO.Net Provider for SQLite. And it must be Christmas because it's public domain too... Seriously, I'm pretty excited by this discovery. I thought it was cool when I discovered MSDE, but this is a million times easier. I'm suddenly thinking, "Quick! What kind of apps can I write that need a database!?" which is probably why I never finish my projects... I'm more excited about the technology than the actual project. :-) Tags: .net, database, sqlite, tech Current Mood: excited Current Music: Cesium 137 - Transient
|
 |
 |
 |
 |
|
 |
 |







 |
|
 |
 |
 |
 |
|
 |
 |
So I've become addicted to the del.icio.us/popular page. It's a list of sites that have recently been bookmarked by lots of people. If you find that between your rss feeds and news sites you somehow still don't have enough stuff to read, you should definitely check it out. =] Anyway, last night while I was laying in bed not sleeping, I started thinking about making money (I'm a poor college student, after all)... specifically, making money on the web... and I started wondering what made for popular websites... That's when I thought of del.icio.us. It just so happens that one of the main features of del.icio.us is tagging. Whenever you bookmark a site, you can specify some tags to describe it. And for any site on del.icio.us, you can get a list of everybody who has bookmarked it and what tags they used ( example). So I had everything I needed to find out what makes for popular websites (content-wise, anyway). As it turns out, del.icio.us already has an interesting visualization of popular tags, but I didn't let that stop me. =] Over the course of a few hours I wrote some really hacky perl (using a mix of RSS and screen scrapting) to grab all of the tagging information for the most popular sites on del.icio.us and tabulate the results. First I just found the most popular tags. Then I thought it'd be interesting to look for pairs of tags that get used often, or even triplets, etc... ( Results )More InfoIf you want the full results or to try it yourself or whatever, head over here.
|
 |
 |
 |
 |
|
 |
 |


 |
|
 |
 |
 |
 |
|
 |
 |
What is SuperMemo? A while ago I happened across a piece of software called SuperMemo. It's essentially a super-duper spiffy flash card program. The main thing that makes it special is that it uses spaced repetition ("a learning technique in which increasing intervals of time are used between subsequent reviews"). The primary author, Dr. Piotr A. Wozniak, has done a lot of work in learning and memory (he's written tons of articles). SuperMemo uses a special algorithm, based on models of human learning, which attempts to schedule reviews so that you review as infrequently as possible while retaining as much as possible. Okay... Why is this cool?I've actually just barely started using it, but I think it's super cool for several reasons: - Learn more, faster. SuperMemo is basically a highly optimized method of learning. According to the website, "it makes it possible to closely approach the maximum natural capacity of the human brain to store and retain information," boasting learning speed increases of 10-50 times normal...
- Learn what you want. I have a tendency to learn new things and then to my great frustration, promptly forget them. I read interesting articles and then forget the details or I say "I should remember that" and then promptly forget. With SuperMemo, you can just add things you want to remember: important details from an article you read, the birthdays of your family and friends, facts about your favorite band, whatever. And then SuperMemo will make sure that you don't forget it. This gives you great control over your learning. Everything you want to remember, you put in SuperMemo. If you should no longer need to remember it, you can remove it. It's that simple.
- Share knowledge. Once you create a set of question-and-answer pairs, you can easily export them as a collection and share them with other people. There's already a decent-sized SuperMemo Library of collections available (unfortunately only a limited subset are free). Want to learn Spanish? The states and capitals? Gastrointestinal Medicine? GRE General Vocabulary? Just download some collection and start learning new stuff!
Any catches? Unfortunately, yes. =[
- Not Quite Free. The latest version is SuperMemo 2004 and costs $40. However you can download the older SuperMemo 98 for free here. That's what I'm using and it works fine. I may buy 2004 before long though...
- Poor UI. SuperMemo is an awesome program functionally, but its user interface rather stinks. It's not very intuitive and it's much more complicated than necessary. Once you learn it, it's pretty usable, but it still gives me unpleasant feelings. (Since I'm using the 98 version, it's possible that this has improved but the screenshots make me suspect not.)
Getting Started The SuperMemo website is absolutely full of information on a variety of topics (as you browse, it's easy to feel overloaded)... You might want to start at the SuperMemo Introduction page, but you may find yourself getting sucked into lots of long articles that are interesting, but not really required reading. So if you're in a hurry, I'd recommend hitting the download page and then ABC of using SuperMemo and then maybe Hints&Tips. Once you've figured out how to use the program, 20 rules of formulating knowledge is good reading for learning how to create good question-answer pairs.
Like I said, the UI is kind of rough. So if you run into trouble, feel free to leave a comment and I'll try to help.
|
 |
 |
 |
 |
|
 |
 |


 |
|
 |
 |
 |
 |
|
 |
 |
I kind of mentioned ReSharper a while back... I found it while looking for a C# refactoring tool, but it ended up being a lot more. When I first posted about it, they were doing a free public beta. But that ended long ago, and I actually purchased it for $100 which is quite a bit more than I've ever spent on any other piece of software. So I figured I should devote a post to it. This is why it's totally worth it: - Improved Error Highlighting - VS.Net parses stuff as you type and hilights some mistakes. ReSharper improves upon this to the point that I rarely ever have build errors. ReSharper catches all of my mistakes as I make them (hilighting them appropriately). It's significantly easier to fix a mistake right after you make it than to fix it thirty minutes later when you finally get around to building.
- Code Assistance - So I type "ArrayList a = new ArrayList();" but oh no! I forgot to add a using statement for System.Collections. Have no fear, ReSharper is here! It gives me a little icon I can click on and then choose "Add using statement" Two cool things just happened. 1) I didn't have to remember what namespace ArrayList is in. ReSharper found it automatically. 2) I didn't have to go to the top of the file, add the using statement, find my place again, and then try to remember what I was doing. This is a pretty big win! (Note: It helps you out with other things too. This is just my favorite.)
- Code Completion - It has smarter code completion than VS.Net, based on context. So I can type "ArrayList a = new <ctrl><shift><space>" and it automatically completes to "ArrayList a = new ArrayList()" Pretty slick.
- Refactoring - Yeah. It does all that.
There are lots of other features I'm leaving out, partially because it's hard to remember what features were in VS.Net already and which were added by ReSharper. You can check out their full list of features if you're curious. As I look at it, I'm noticing cool features that I don't even use yet! =] The only real drawback is that it can be a little slow, especially with large projects. But so far it's just been a minor annoyance. If you spend much time writing C# code with VS.Net 2003, you should check it out. It's free for 30 days. $99 for a permanent license: http://www.jetbrains.com/resharper/download/ It'll be interesting to see how much of this stuff Microsoft incorporates in the next version of Visual Studio. It's awesome stuff.
|
 |
 |
 |
 |
|
 |
 |

 |
|
 |
 |
 |
 |
|
 |
 |
Over 4 years ago, I wrote the first version of my resume using Microsoft Word. It was made up of nested tables and some tricky formatting. It looked pretty good, but it was kind of a pain to maintain. Ever since I started using LaTeX last year I've been itching to convert my resume to LaTeX. Today after fighting with Word to stop making my resume two pages (with nothing on the second), I decided to take the plunge. It ended up being easier than I expected! I found these resume templates which make use of this LaTeX Resume Style. I used one of the templates ( res2.tex), put all of my content into the document, tweaked it a bit, and got a pretty good result! I think it looks better than my old one, it should be easier to update, and since TeX is just text, I could use revision control on it. =] My resume: resume.pdfSource file: resume.tex (depends on res.cls and tweaklist.sty)
|
 |
 |
 |
 |
|
 |
 |


 |
|
 |
 |
 |
 |
|
 |
 |
So if you are using the System.Drawing.Imaging.Bitmap class to create gif images, make sure you use PixelFormat.Format8bppIndexed, even if you don't need that big of a palette. I tried Format1bppIndexed and Format4bppIndexed in attempts to create smaller gif files. But I think the framework can only save 256-color gifs. So it converts them, and in the process changes the palette and (if necessary) dithers the image. Lovely. So I end up with a file as big as if I had used Format8bppIndexed in the first place, and my image has been tainted. So just use Format8bppIndexed. While googling, I came across GD-Sharp, a .Net wrapper for the GD Graphics Library. Sounded promising. Sadly, it hasn't been updated since GD Library re-added gif support (after the LZW patent expired), so it doesn't quite help. Probably wouldn't be too hard to update it to get gifs working though... Incidentally, after playing around in VC# 2005 Express a bit, it appears that the current .Net 2.0 beta doesn't fix this issue. Nor does it fix the ColorPalette weirdness I mentioned a while back. Nor does it seem to support animated gifs which was actually what I was originally going after. *sigh*
|
 |
 |
 |
 |
|
 |
 |



 |
|
 |
 |
 |
 |
|
 |
 |
For my compilers class, I and a partner are giving a 40 minute presentation on debugging tomorrow. I was finishing up some demos for the talk just now and came across something really interesting. Check out the following code:</p>
int add(int a, int b)
{
if (b == 0)
{
return a;
}
else
{
return add(1 + a, b - 1);
}
}
It's an add function that works by calling itself recursively, adding one to the left and subtracting one from the right each time. Pretty silly, but fun to play with. Now when you compile with Visual Studio in debug mode, all optimizations are turned off. It executes each line exactly as shown, which means it grows the stack for each recursive call. So it ends up failing for big values of b due to stack overflow. Okay. Nothing shocking.
Now when you compile in release mode it turns on lots of optimizations. I expected it to take advantage of the tail recursion and effectively turn those returns into gotos, preventing the stack from growing. But that is not what happened! I got this assembly instead:
00401000 mov ecx,dword ptr [esp+8] /* b */
00401004 test ecx,ecx
00401006 mov eax,dword ptr [esp+4] /* a */
0040100A je add+0Eh (40100Eh)
0040100C add eax,ecx /* a + b */
0040100E ret
Now, I'm not sure what that test and je are for. But ignoring that, it optimized out the entire function! It just uses the add instruction now! No recursive calls. I have no idea how they did that. Pretty amazing, if you ask me. Current Mood: impressed
|
 |
 |
 |
 |
|
 |
 |




|
|
 |