photosinensis: It's the 100x100 version of XKCD #353 (Default)
posted by [personal profile] photosinensis at 05:53pm on 04/06/2009 under
This was posted originally at my WordPress blog, here.

I’m retaking automata this summer, mostly because I bombed it the first two times I tried taking the class. Today, I realized why I have such troubles with this particular subject. It’s not that I don’t understand the material, it’s that I have a hard time doing tedious and repetitive tasks with large sets of similar data.

Sure, I know how to convert a nondeterministic finite automaton to a deterministic finite automaton, and I can construct a regular expression from that data, but doing it is another thing entirely. I can’t keep track of the state changes, no matter how much spare paper I have.

It would be different if the practice of converting between these forms were in any way useful, but the fact is that it seems that little of the class has any practical value, other than as a mechanism to discuss what computers can’t do. In any case, this doesn’t seem like the best approach to teaching this particular topic. It requires a semester of discussion of tangential issues before you can even discuss the main point of the course, which takes about an hour to explain.

I don’t hold out much hope that I’ll do any better this time than I did during the last two, as it’s not the concepts that elude me. It’s the fact that the course is graded based on performing tedious operations that don’t seem to embody the core concepts well.

In short, I’m whining that I can’t keep track of state changes when there are a lot of them. This isn’t something practice can remedy, though: I get the same kind of scrambling whether I do it twice or two thousand times.

photosinensis: It's the 100x100 version of XKCD #353 (Default)
posted by [personal profile] photosinensis at 01:49pm on 27/04/2009 under ,
I've got to cough up three letters of recommendation and a statement of purpose in order to apply for grad school. While I've got ideas for two of the letters of recommendation, and have even asked one of the people involved, I've got no clue what to do with the statement of purpose.

I'd like to have statement of purpose done by the end of the week, sooner if possible. Since some of y'all have actually gotten into grad school, what should I be doing? What do I need to include? What should my CV look like, and what should I emphasize there? I know I'm going to have to fork my CV from the current version, which is more geared towards work experience and not academia.

Help me, Obi Wan Kenobi. You're my only hope.
photosinensis: It's the 100x100 version of XKCD #353 (Default)
posted by [personal profile] photosinensis at 12:43am on 18/04/2009 under , , ,
Jean Paul Satre once said, "Hell is other people." Perhaps if he were a programmer, he would have said, "Hell is other people's code." I'm currently helping a friend with some C++ he's doing for an assignment. Said friend is a Windows programmer, whose knowledge of Linux/Unix is "it exists and is weird". I can't blame him: who would willingly leave the world of comfortable integrated development environments with decent debuggers and a rich, built-in (if proprietary) library that keeps you from needing to know most of the standard language? That last one is particularly nice in C++, where I can't even keep such things straight in the standard library.

So he comes to me today with his latest assignment, which he's written and has working on his Windows box, but now needs to port to a Unix box. Now, let me pause for a minute here and say that the school has not made his life easy: the Unix box he's working on is an DEC/Compaq Alpha box from about 2000 or so. uname -a returns "OSF1 creek.uh.edu V5.1 1885 alpha". It's C++ compiler is equally antiquated: "Compaq C++ V6.5-014 for Compaq Tru64 UNIX V5.1A (Rev. 1885) Compiler Driver V6.5-014 (cxx) cxx Driver". Its support for the STL is spotty: there's no support for character streams that don't involve I/O directly. He doesn't know make, either. So let's just say that the deck is very much stacked against the guy, and it's no wonder that our university's program produces grads that cling tenaciously to Windows or Java, as using this box could scar a person for life (which it has on multiple occasions: I have to play *nix apologist to get people to play on Linux or Mac).

Now, I've been telling him to write Unix code on a *nix of some nature1. However, he insists on writing in Visual Studio, then moving files over to the target box2. This leads to obvious compatibility issues.

After a while of auditing his code, to see why it won't build on my box (uname -a gives "Linux thephotoman-laptop 2.6.28-11-generic #41-Ubuntu SMP Wed Apr 8 04:38:53 UTC 2009 i686 GNU/Linux"), I see things like atoi() being undeclared. I look, and there is no reference to the cstdlib header. Obviously Visual Studio and Compaq C++ are both letting him off easy3. He's also using compilers that let him get away with a main function without a return value (standard C++ dictates that main() return an int). This leads to me getting in touch with my Pulp Fiction side.

I also see that he's hardcoded a file path in his program. It reads "C:\input2.txt". We'll not touch what's wrong with that in Windows, but obviously it won't work on a *nix box4.

So now, at an hour that most humans would consider ungodly, he's downloading and installing VMWare Player and an Ubuntu image5. Tomorrow, I'll walk him through GDB and following forks.

1. Usually, I prefer either Darwin 9.x or Linux 2.6.2x on 686. The former has my favorite text editor, Smultron, and the latter actually has a full set of working tools. Apple appears to have broken GDB on Darwin, and I can't seem to figure out how to compile GNU's version on the platform. If anyone has tips, I'd appreciate it.
2. I don't blame him for writing code on other boxen. vi and emacs are equally unusable on that system.
3. To his credit, he did figure out -lm on his own. That tripped me up the first time. He's not a bad coder, he just fails at Unix.
4. Again, I have some fail here as well: he sent me a copy of the file that was Unix-safe. I didn't see it until after I'd fixed the copy I'd been looking at.
5. Presumably, he'll also use Jim's First Time Script to get the dev tools6, which aren't a part of the default installation. Yes, I'm pimping my own little side project.
6. Interestingly, this includes vim. Don't ask me why.

October

SunMonTueWedThuFriSat
  1
 
2
 
3
 
4
 
5
 
6
 
7
 
8
 
9
 
10
 
11
 
12
 
13
 
14
 
15
 
16
 
17
 
18
 
19
 
20
 
21
 
22
 
23
 
24
 
25
 
26
 
27
 
28
 
29 30
 
31