Monday, February 11, 2008

Feed Getter

I've mentioned in a previous post an RSS aggregator that I'm working on. It's tentatively called Feed Getter. I'm putting it up now because it's usable, and it would be nice to get feedback from anyone that wants this kind of thing. Here's the pitch:

I can't find any RSS aggregators that just save the files I ask for. I don't want a program to download and play my podcasts for me, I just want the files on my machine, where I ask them to be, so I can view and play them with my usual programs. I want it to be automated, I don't want an interface. This is especially useful for automated things, like a desktop background changer. If you agree, Feed Getter may be for you.

Now, it's in early stages, but it gets your files for the most part. The biggest issues: a) It gets files again, even if you have them already. I do this because I'm not sure if files on your machine are incomplete or not, so I assume they're incomplete and get the whole thing over again. The solution is to write to a temp file, and do an atomic copy to the main file only when it's done. That way I'm sure that if it's in the main file, it's complete. This will probably be in version 0.2. b) It doesn't delete old files. Probably version 0.3.

Now, at this point I don't run this as my main user, and I especially won't once I start deleting files, and you may consider doing the same. I want to make sure that my code regarding restricting file creation/deletion to certain paths is safe before I do. If you're interested in using this program, and you're experienced in path safety in python, maybe you could review my code.

So Here it is. Check it out, let me know what you think.

Saturday, February 9, 2008

Optional sections of your document using LaTex

If you're like me, you have more that you could put on your resume than you can fit. You have to cut it down to what's relevant, but sometimes the best things to put in differ based on who you're sending it to. So you have to make different versions of your resume. And then it turns out you need to reformat something in your basic info, and you have to change every version. If you used a word processor for this, you know how this could be a pain in the ass.

This is why I liked the idea of LaTeX; it's technically a programming language. TeX is anyway. I could make one giant resume, and put a bunch of conditionals in there. Now, I figured out how to do this, and I think it's a hack, I'm not really sure how this language works and I don't really care to find out. Point is, this works.

Here's an example. Let's say there's an internship that I did a while ago that I might not want to include in all versions of my resume. First, I define this variable at the top:

\global\let\includeinternship\relax


Then I test if it's undefined:


\ifx\includeinternship\undefined
\textbf{Internship}
\begin{itemize}
\item Brought coffee to employees
\item Sat around
\item Oh one time my boss had me make a spreadsheet
\end{itemize}
\fi


You defined it, so it won't show up. Sortof backwards, but it works. Again, it's a hack, and I'm too lazy to figure out how to do it right. So, to make it show up, comment out the definition:

%\global\let\includeinternship\relax


So you could put all the variables on top, and that's a lot more convenient than what you had before. But it could still be better. Lets say you have different versions of your resume.tex handy, with different variable settings. If you have to change some formatting or details in your resume, you're back where you started; you have to make the change in all versions of the file. So, you should have only one version of resume.tex, and include the file variables.sty:

In resume.tex:
\usepackage{variables}


In variables.sty, in the same directory:

%\global\let\includeinternship\relax
\global\let\includecrappygpa\relax
%\global\let\includemacaroniartproject\relax


So now, you keep around multiple versions of variables.sty, with different combinations of variable definitions commented out. Any changes to your resume, you only have to do once. Now, what if you're updating your resume and you decide to add variables. Well, that's the downside. You would have to add it to all the variable files. But that's a lot better and more straightforward, in my opinion, than making a more complicated change to multiple versions of a whole resume file.

At this point, you can make multiple versions of variables.sty, or you can make a quick change to variables.sty and make a new resume.pdf. With multiple versions, you still have to rename them to variables.sty to use them. So, you just put it in my resume generating script:


cp $1 variables.sty
pdflatex resume.tex


Of course, you have to be careful not to have anything you want to keep in variables.sty, because the cp will overwrite it. Keep your actual work in different files that you pass to this script. For instance:

./makeResume.sh version3.sty

Wednesday, February 6, 2008

Submitted For Your Approval

I talked about Differential Equation Munchers a bit in my previous post. I decided that I'm not going to wait until the game is "presentable" before releasing it. So Here You Go. It's in a "fully functional" state, but it's not pretty. I did get around to at least stealing all the Muncher artwork from the original game, but the Troggles still look MS Paint quality. Let me know if you decide to try it out.