Monday, November 24, 2008

Joe sent me

I moved into a new place recently. I need Internet access, and I wanted to avoid giving any more money to AT&T, and I've heard that Comcast isn't much better. I looked into Copowi first. We couldn't get them to work at our last apartment (though it's at LEAST 50% AT&T's fault, I'm sure more). I'd say they're not too bad, I had a support ticket and a support person that was willing to try different options to get my stuff to work. In the end, they refunded my money and even let me keep my modem. I was thinking it over again; do I want to deal with AT&T for a phone line again, and then wait for Copowi, potentially dealing with the same fiasco? Well this made my decision very simple:

Copowi: Preventing The Depression

Thanks, but I'll get my information "they don't want you to know" from Alex Jones, and I'll get my Internet access from Speakeasy.

I'd heard about Speakeasy from a couple people. They're a smaller ISP like Copowi. One person told me he used it and they had great service. Turns out, I can get the nets from them without even getting a phone line from AT&T. (Copowi doesn't offer that in Chicago yet, though I think it does in other cities). Speakeasy is pretty expensive (I'm too embarrassed to give the actual amount), you can look up the rates yourself. But it's worth it to not have to give money to or otherwise deal with The New AT&T (you can ask me about my experience with them if you'd like, I won't get into it here, this post is too long as it is). Plus, I'm paying for very impressive service, as you will soon see.

The following might seem like trivial reasons to fawn over a company, but think of all the little annoyances that come up when you deal with companies. Particularly telecom. As usual, it's the small things that make a company great.

I went to Speakeasy's site to see if they were available in my area. For some reason the form got confused about my zip code. There was another form below, however, to request someone to contact me to help. I chose email over phone (I'm an engineer, I don't like to talk to people). Plus email is much more out of the way.

So I believe the next day I get an email from the guy. I asked him about my address, and he responded saying that I should be good, though I can't get more than 1.5 Mbps. I fire off a ton of questions at him all day, (it's a tough decision, a year contract, a high price). He responds to all my questions, probably within 15 minutes every time. I ask at one point if I can use a modem I had on hand (from copowi) instead of the modem that comes with the plan.

"There is no real way to tell as it is all based on the chipset used to sync with the dslam at the central office. I can definitely set up the order for you using your own modem, and if worse comes to worst and it doesn't work you can just get our Modem if you like."

See, that strikes me well, because he's a sales guy, but he uses terms like chipset. Good to know that the people selling me stuff know what they're talking about.

Eventually I say that I'm interested. He sends me a form to fill out and fax (I preferred not to send my credit card number over email or cell phone, and I didn't feel like asking about GPG). Today I get my form email giving the details of the account. I was impressed by the fact that this form email said the following:

"You have instructed your sales person to NOT order hardware for this installation. You have reported owning the following bridge/router:

Broadxent 8012-V

If an onsite technician attempts to deliver unordered hardware, simply inform them that you have your own, approved and supported CPE."


So they got my modem model wrong, but think about the fact that they had this option in a form email. I would have expected just a lack of charge for the modem, or they would charge me, but then the support guy would tell me "yeah, ignore that. I put in a note". I'm impressed that "customer has his own modem" is a standardized option for them.

So I log into my account, and find that I can easily change my mailing and shipping address. The order info page has more technical and contact info (for the folks setting up my connection) than I know what to do with. It has a list of 8 "Stages" to getting a working connection (Order Received, Order Placed, Install Confirmation, IP Addresses & Circuit Configured, etc). It shows details for each, including how long I should expect to wait, and of course which one I'm currently on. And, there's a dropdown box where I can choose how often I want email status updates (24, 48, 72, hours, or never) Underneath, there's some sort of "up to the minute report":

"The work log below represents the available documented efforts of Speakeasy and vendor (as indicated by their respective logos) to complete installation of your service.

Speakeasy's service activation team proactively works to install your circuit at the highest level of priority. This real-time installation progress report provides the most current, complete and accurate update on your installation status...."


Wow. Overkill, honestly. Though, if this were for a business I would probably appreciate this more.

To top it all off, while I wait for my DSL connection, they offer a complimentary dialup connection that I can use right now. I don't have a phone line to use it on, but still, that's some really slick Business Fu if you ask me.

One thing I don't really like is that the prices he gave me over email don't seem to be the same scheme that they have posted on their site. I may have just gotten confused on that though. And yes, for sending my credit card info, they should have had an encrypted web form for ordering service. Heck maybe they did, I didn't check, but I sortof wanted to go through this guy, since he was already helping me out and could sort out any issues I had, plus maybe he's getting commission. Finally, for some reason they didn't send my password or account number in my form email, but I emailed the support guy and got those right away.

There's more to come with this, I'm sure. If it's anything spectacular I may post again.

Sunday, November 16, 2008

Some Intrepid notes

I figured I'd mention this in case other people have these problems (and solutions) and want to know if they're alone.

So on my laptop, Dell Inspiron 6400, I went from Gutsy to Intrepid within a couple days. I tried Hardy very briefly. My Gutsy->Hardy upgrade was rocky, but Hardy->Intrepid was smooth as a baby's bottom.

So, starting with Hardy, Sendmail takes about a minute to start. Though I'm told that it's because I never configured it. I never use it. So I uninstalled it. I don't even remember why I had it. BUT, it never did this under Gutsy.

Starting with Intrepid, something related to dhclient takes about a minute, dare I say maybe two minutes, to start during my boot sequence. I'm working on resolving it at the moment. Pretty sad.

Gnome doesn't have as many compiz bugs when starting up as I've had in Gutsy, but overall I feel like it takes longer before things are usable. Once it's up though, it's just fine. I think Firefox is faster, yay.

Now, some of my run-on-startup program configs got wiped, I think going from Hardy->Intrepid. I hear this has something to do with Gnome sessions stuff. I never was in love with Gnome anyway, maybe it's time to switch. I'm intrigued by wmii, and all the cool kids in my LUG are using it, so I might have to try it if I want to still be cool. I tried running it once, just to see if it had a usable default. It didn't really, but it started up pretty much instantly. Sortof scary. Or maybe it's sortof scary how much useless garbage Gnome starts up. Thank God it's Linux and I have a choice.

Also, I use Tilda. I don't have the package installed since I was doing some development on it. For some reason, twice now, my config got wiped just randomly; it went back to the default config. I'm going to guess it has something to do with the Hardy or Intrepid updates. This has never happened before, I wonder what's up.

Now, wireless, that's delicious. I have:

0b:00.0 Network controller: Broadcom Corporation BCM4311 802.11b/g WLAN (rev 01)

It's been getting progressively better over the semi-year releases. But up to Gutsy, it was still flaky. When I started up, I would have to reload the driver before getting it to work (unless I waited a while before logging in. Hmm.) Anyway, none of that in Intrepid (probably Hardy, I never really gave it a spin, but I think that's when my new driver came in). It also connects to anything reasonable that I've thrown at it, things that I could only connect to after a struggle, at best, before. I can steal the nets from my apartment where I couldn't in Gutsy. The whole issue of "wireless sucks on Linux" seems to be history for my particular configuration. I know your mileage will probably vary.

How did a quick rant become so long?

Monday, September 8, 2008

Reversing lists and strings in python; third field in [] is for step

This is the simplest way to reverse a string or list in Python:


>>> "aoeu"[::-1]
'ueoa'


I was about to say this was pretty shitty because it doesn't follow any sort of pattern, it seems to be a special thing just out of nowhere. But then I tried -2, and -3. Turns out the third field is for step.


>>> "aoeu"[::-1]
'ueoa'
>>> "aoeu"[::-2]
'uo'
>>> "aoeu"[::-3]
'ua'
>>> "0123456789"[::]
'0123456789'
>>> "0123456789"[::1]
'0123456789'
>>> "0123456789"[::2]
'02468'
>>> "0123456789"[::3]
'0369'
>>> "0123456789"[::-1]
'9876543210'
>>> "0123456789"[::-2]
'97531'
>>> "0123456789"[::-3]
'9630'
>>> "0123456789"[2:4:-1]
''
>>> "0123456789"[4:2:-1]
'43'


So, with [4:10] it takes the 4th through 10th item in the list. With [4:10:2], it takes every other item from 4 to 10. With [4:10:3] it takes every third item, and so forth. With [4:10:-1], well it seems to do nothing, but with [10:4:-1] it takes every item from 4 through 10, but in reverse order. With [10:4:-2] it takes every other item in reverse order.

The more you know. No rainbows please.

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.

Monday, January 7, 2008

To My Naysayers

You know you you are. I have successfully created a way to generate examples of first and second order differential equations. A little backstory is in order I guess.

I mentioned my game engine in an earlier post. At this point, it's far from done, but it's functional. I put that on hold to make my game demo, which uses what I have so far of the engine. Independent of all this, I had the idea to make a game called Differential Equation Munchers, a parody of the classic Number Munchers, which the lucky among us had a chance to play in our elementary school Apple labs. I've decided to use this opportunity and make this as my demo.

In the original game, you're given a category of things, such as "Multiples of 4". You walk around the board and eat the numbers that fit into that category. But watch out for the Troggle! Troggles can come into the board and eat you, so avoid them. You also die if you eat a number not in the category. You win the level when you eat all the numbers in the category.

For my version, the categories are related to differential equations. Which means that I have to somehow render differential equations. My thought was that I would generate them on the fly. Someone else suggested that I should have a table instead. Supposedly, writing a generator would take too long. I didn't want to make a table, I said. Either I would have too small a pool of possible answers, or it would be a real pain in the ass making a huge table by hand in Gimp. Plus, come on, that's lame. Right?

Well, this weekend, I made a generator for First and Second order differential equations. I decided that, yes, if my categories were things like solutions to the differential equation y' = 5xy + 7, I may be facing way more work than I intended, because I would have to solve Dif Eq's on the fly. However, if it's just categories like First Order Differential Equations, then it's a simple matter of generating an equation that happens to have a y' in it (and some other rules). My program doesn't have to have any notion of solving or understanding a differential equation, it's just a dumb image generator. Read 'em and weep:


(click to embiggen)

Granted, this is a simplified version of what I want ultimately. I can take more time to make generators for that stuff later. This is good enough for my demo. Also, for the more complicated stuff down the line, there is a Python library called sympy that can help me manipulate algebraic expressions.

Anyway, I'm happy about that. The game is in fact playable now. I have to add things like number of lives, score, splash screens, difficulty, etc. Then it'll be fully functional. Then I'd have to go clean up pictures (making the dif eq's more readable would be a good start). Also putting the original artwork in. Then I'll have to add more categories of equations. Then it'll be suitable for a demo.