i miss you, world!

February 21st, 2009

aha! I’m lame. Haven’t updated in.. yes… 2 months and 6 days. I believe that officially puts me in the world of “suck”. Redbrain from #linuxoutlaws (@freenode) actually said to me almost a month ago: “Hey, nice blog man, keep it up!” and I said to myself “Man, I really should update that”. But I didn’t. There are no real excuses, but I’ll make some anyways, namely:

  1. STL, I love you, but I hate you. Templates, You guys can suck a fatty too. You’re so useful, but just such a pain in my patoot. Of course, I treat you well when we’re writing together on our own… but the pain you cause me when you’ve run off with someone less responsible than me is excruciating. Where’s the love?
  2. Haskell … oh boy Haskell. When I discovered the ease of Python after being raised in the world of C/C++, Python was the Orinoco Flow of my programming world! Light and airy, I swear as I checked my indentation that first time that around the world hippies were swaying and holding hands rejoicing about something or other. But Haskell.. you dirty rascal.. you’re my Korpiklaani. You’re a wild beast that’s angry and ready to be let loose on anything that needs a quirky methodology, and yet at the same time, you’re catchy, and enjoyable, and oddly enough, make perfect sense. I don’t know what it is about Haskell (or Korpiklaani, for that matter)… it’s clunky syntax and functional modus operandi are bewildering, but I like the way it works. So much of Project Euler, if done in Haskell, are one-liners, and the flow of them actually makes sense. Haskell seems like doing surgery with a chainsaw, and miraculously, the patient not only is cured, but has grown organs for breathing underwater and x-ray vision. It’s just got that kind of whiz-bang.
  3. Left 4 Dead. I haven’t had much time to play, but boy oh boy. If you haven’t seen this game somehow.. let me sum it up for you: Post-apocolypse + Zombies + shotguns + multiplayer first-person-shooter = love.

And that, boils and ghouls, has been what my last two months has been all about. Let’s see if I can make it around to actually post again before I’m 70.

swamped

December 15th, 2008

Boy, oh boy! I have just been swamped recently between work, school, and actually trying to get to the gym once in a while. Glad I could make it in to post before the month since my last post rolled over. I already feel like a jackass not updating.

Work is going well. The students have their finals this week, which means the next two weeks I basically get to do nothing. For the next 4 or 5 days though, it will be sheer madness. Students seem to want to wait until the last minute when they’re desparately behind to ask for help, by which point they’ve frustrated themselves so thoroughly, they expect me to step in an just do it for them (to which I respond by giving them a big ol’ ticket for a free trip on the FAILboat). I’m also amazed sometimes by how much people want to (yes WANT) to not catch on, and continue to make excuses as to why they can’t do something instead of just learning to do it. It makes me wonder if in the past (or even currently) I have done the same things. I’d like to think not.

School, while intriguing and challenging, has been eating up a good hunk of time. I’m OK with that. In my programming classes over the past few weeks, I’ve had the pleasure of re-implementing the unix tools “cat” and “grep” in c/c++ and the FreeBSD passwd diff’ing security check in bash. It’s kind of neat to dissect and re-implement the tools I’ve been using for so long. While they seem like trivial exercises, it teaches alot about why software engineers design software they way they do. Who would have thought there were so many ways to put the contents of a file to STDOUT? Now the question is, whose way is faster, better, and more concise, and why is that? I know when I’m doing work for production, a lot of times these questions don’t receive alot of attention. “Oh, it compiles? Ship it!” It’s nice to see some time spent discussing the science behind our science. ;)

Fun stuff.

Since the recent laconica updates, lopost is indeed broken. I have not had the time to fix it. Sad but true. I’ll probably rework it over the semester break. Chances are I’ll have to take a look at the way gwibber does it, as my code was based on the original python at the laconi.ca trac, which no longer works.

I’ve also been asked to help out with the SQL security libraries for Photon CRM, although all of that is still in the planning stages. I’ve started writing some documentation (as in anything that doesn’t exist yet, document first, implement second), but we’ll see how much time I end up having for actually writing the code.

i suck

November 18th, 2008

… at updating regularly. But hey, I had to squeeze one in before that good old month marker hit. Things have not been bad. I’ve had a good bit of busy work between bash scripting and working on a bunch of boring object-features stuff in C++. Sadly, none of it is really worth posting, it’s all just exactly what it should be — busy work. Working in the labs has been a nice relief. I swear to god, people have the DUMBEST questions every, but I feel good knowing that, by the time they leave my presence they are either cowering in fear or know exactly why that thing they were doing was not as it should be.

Ok really, I don’t make people cower in fear. I feel good knowing that that girl there didn’t know how to copy a file on to her flash drive, but now she both hates me for wasting 30 minutes of her life making her learn how to copy the file instead of doing it for her, as well as knowing how to copy the file itself. Sure, people don’t like to learn. They want things to be done for them. I am not of this mindset. I would like to learn at least the bare minimum of everything I should be involved in, though I make no pretenses about leaving expertise to the experts.

For now, it is likely to be quiet on this page. It has been 5 weeks since my last update, but those are 5 weeks well spent learning and teaching. The only thing I have in the running of interest to the outside world is a revision of some of the packages for Ninjas and Pirates, as I’m trying to get the forum games integrated with the actual forums. I may end up posting about that. Otherwise, Haskell has been sparking my interest, but I don’t see any likelihood of actually having time to learn it anywhere in the near future.

So, until next time, I’m off to give the world some PHP and a piece of my mind!

lopost python script

October 10th, 2008

Last post I talked about the laconica services and using linuxoutlaws.net. Well, I really enjoy it, but I wanted to be able to post without actually visitng the site. My first thoughts were to write something in perl so I could use it as an irssi plugin. I ended up just writing a stand-alone script in python and creating an alias in irssi to call it. It ended up being quite easy to add all the features I wanted, and I’m pretty pleased about that. I’ll be putting up the code, and I’ll keep it updated if I do more work on it.

Update: Code posted @ lopost

laconica on linuxoutlaws.net

September 27th, 2008

Well, you may notice I’ve added a feed over on the right there of tweets (as in twitter). I’ve avoided sites like twitter for a few reasons:

  1. I feel like I can handle my own social networking, thank you very much. This is why I have my own blog, where I aggregate what I do at other sites (like the music I listen to and articles I digg) all on my own.
  2. Sites like Twitter and Facebook run proprietary software. No one is able to see, modify, or redistribute the code for these sites.
  3. Said sites also maintain licenses that can restrict what you post, and call into question the ownership rights of anything posted to them.

My friends over at Linux Outlaws have solved this problem for me. They’ve installed a service called Laconica, which functions much the same way as other micro-blogging software, like Twitter. The difference, however, between this and other services is that it is open-source software, and it is being run by some fellas I consider friends, which means that I am indeed, handling my own social networking. On top of that, I don’t feel like I should ever have to worry about doing something like aggregating my own posts over to this site and wondering if I really have a right to re-distribute my own content. One more neat part? You can subscribe to others’ tweets, even if they’re not on the same Laconica server.

If you’re interested, head over to Linux Outlaws’ Laconica site, and sign up. Also, if you have any interest in computers or Linux or you just hate microsoft, you should really head over to their podcast website and listen. To it all. Dan and Fab kick ass.

Ok, back to implementing a (yes, really) four-function calculator for fractions, in C++.

few and far between, and project euler #15

September 24th, 2008

I feel crappy that I haven’t been updating, but I’ve got 12 hour work days. There’s that twinge of guilt about unattended blogs, but I’ll be in the back of a class supervising a lecture (like I am now, actually) and just think: “now’s not the time!”

But yes, I’m still around, and I haven’t forgotten my meag… erm, “highly exclusive” readership. So, how’s my week been?

Ok. Been working on fixing my damned pointers. I have one that keeps faulting when I delete it and I don’t know why. So, as angry as computers make me, I was glad this morning.

Why? I did a project euler problem (#15) without a lick of programming. The question was in a 20×20 grid, how many combinations of paths are there from one corner to the other. Welllllll permutations tell us it’s the factorial of 2 times of the size of your grid, all over the factorial of the number of possible choices multiplied by factorial of the the number of columns. In easier terms, that’s

(2n)! / ¹n! * ²n!

And since our grid is 20×20… well. You figure it out.

Hope to be back soon enough!

project euler #9

September 5th, 2008

Many of you know I’ve been sucked into the world of Project Euler. I love problem-solving with computers, and I love math, despite not being great at problem-solving with computers and being even worse at mathematics.
As of yet, most of my solutions have been brute-force attempts which get the answer quite ahem thoroughly, if not the most efficiently.
Well, project euler #9 involves calculating pythagorean triplets, and I’d left it for a while deciding it would involve a pain-in-the-ass buttload of calculating and would take about 20 minutes to run. However, I’ve been listening to The Teaching Company’s The Joy of Thinking, and they presented ways of calculating the pythagorean triplets that I’d never really thought of.
Anyways, this morning I was waiting around for a while between errands, and a napkin and 4 lines of python inspired me. All I had to do was reduce the fact that:
2mn+(m*m - n*n)+(m*m+n*n) = 1000
to
m(m+n)=500 and run through m and n with n < m. BAM!

[nate@pepper python]$ time ./peuler9.py
sum = 1000
product = *****

real 0m0.012s
user 0m0.010s
sys 0m0.000s

Yes, I removed the actual answer so as not to be a spoiler. However, I will include my full source code, as I’m amazed at how simple it was, and maybe you’ll enjoy it too.
(source code after the jump…)
Read the rest of this entry »

general updatery

September 5th, 2008

Boy, is school ever busy!
I really dig my new position as a lab assistant. I get to help people, which I’ve always considered a good thing. In some ways, it’s kind of crappy, becuase in the classes that don’t end up needing a lot of technical assistance, I end up getting sent to make copies or working on stuff for project euler, but I consider it well worth it.
Classes are going good too. I’ll be essentially sleeping through my german class, but it will be an easy 5 credits. Might even get fun too.
I had my first C++ class in almost 10 years last night. THAT was a trip. Back when I started learning, STL had barely come into existence. We had only just got up into the process of implementing classes and whatnot. After that, I ended up doing all python and perl and ruby, and who needed to compile?
I got into this class and after our introduction, one of the first comments was “Well, I’m sure you’re all familiar with things the string classes and whatnot, so let’s move on to memory addressing and pointers”
/me jaw_floor()++;
Good news is, it’ll actually be a nice challenge to catch up.
I haven’t been to my Shell Scripting class yet, but it should be alot of fun. It’s with one of my favorite professors, so I plan on it being a fun time.
More later.

busy

August 24th, 2008

oh MAN! Have I ever been busy! Don’t worry, I’m still around, and with all kinds of new news to share. I’m just a tad busy. I’ve moved into a new house (which I’m currently working on wiring the whole place with Cat5E) and I’m switching jobs to a teaching assistant position at Washtenaw Community College. So, once I have the internet functioning throughout the house (and then of course, moving the server, etc) I’ll be back more often.

So no, world, I haven’t forgotten about you. Now, can you hold this cable while I go pull the other end through my wall?

dad’s awesome sculpture

July 28th, 2008

My father would never admit to this, but he is an awesome sculptor. He’s an electronics engineer by trade, but he loves to dabble and build stuff. Well, every once in a while, he will go and make these neat sculptures out of dysfunctional electronics parts. He doesn’t ever really show them off, and they just end up sitting in his basement. I think that is wholly an injustice. People should see how cool these things are!

So, absolutely without any permission whatsoever, I snuck down and took pictures of his latest creation — this kind of humanoid dragon thing. Tell me this isn’t badass!


Dragon Sculpture

Dragon Sculpture

Dragon Sculpture

Dragon Sculpture

Dragon Sculpture

Dragon Sculpture