This is exhausting.

For the past week I’ve come home from my new job exhausted. I don’t really know why. It’s not even full time. It just saps the energy out of me. Being able to earn a few hundred dollars a week is great, but I make more wealth sitting at my desk with my MacBook, wearing jeans and a T-shirt and no bra, rather than sitting in an office with a Win7 machine, wearing–well, technically, I can wear casual stuff there too, but I don’t get taken as seriously if I’m not in slacks and there’s no way on Earth I’m leaving the house braless. I don’t know what’s going to happen when I’m also going to school.

Yesterday (Saturday), I sat in front of my computer for three hours, trying to hack tinypapers. You know how many lines of code I wrote? Five. I couldn’t focus. I was too tired.

So, at 9:30 PM, I went to bed intending to get up at 12:30 (after two sleep cycles) and wake up at my natural working time. I didn’t set my phone alarm right, though, and when I woke up it was to the work alarm I’d forgotten to turn off… at 7:30 AM.

I’m off phase so badly that I’m still exhausted anyway. I’m thinking of going back to bed even now. I really want to hack, but I’m half asleep as I type.

I’m also lost as to how to set up this JSON store; I’m thinking of maybe just storing stuff in files and being done with it. I’m going to have to move to Redis later anyway; I just want it to work for now. I’m still pushing myself to have a working alpha before school starts.

But it’s hard to fight my brain, which–right now–is saying to sleep.

Advertisements

Design sense, belatedly triggering

There’s something pretty sucky about the way I’ve been structuring tinypapers. It’s getting too spaghettti-code-like. A line I wrote a few days ago to solve a problem made me feel uneasy (I think I mentioned this already somewhere?) and I couldn’t find a different approach. Then there are these more recent issues that have been making me twitchy. My design sense finally put two and two together… there’s some funky stuff going on I need to fix.

Anyway, I’m going to have to spend a day or two refactoring (and, where possible, minimizing) the “power” structure before it gets any more complicated. I just sat down with an actual pen and paper (magical tools) and it’s pretty obvious that something isn’t right. Hopefully the visual aid will help kick me into solving what’s wrong.

—–

(several hours later)

Kivy is really confusing about this, though. Because child structures and inheritance are mostly defined in KVlang rather than Python, ordinary design patterns don’t… quite work. I’m in a better position to figure this out now than before I wrote any code, of course.

Here’s the structure.

I’ve got one class (widget if you’re speaking KVlang) which controls which of the other classes is being displayed. I’m calling it a window manager. Of course, in each of the “child” classes (which don’t actually inherit anything from the window manager), there’s at least one button that’s supposed to trigger the window manager and make it display a different page.

You can’t just randomly call them from other classes. The page-switcher methods need an instance of the window manager to work. And I can’t just put the page-switcher methods in the child classes. The reason the window manager exists is that it’s the only part of the program that knows how to do that sort of thing.

So, there isn’t… really a hierarchy in the Python file. It’s mostly just there to define any logical back-end that the KVlang file might need.

The KVlang file has hierarchy all over the place. It basically declares everything.

Anyway, I’ve got this window manager. Underneath it I have the main page that lists categories of documents (“Business Cards”, etc) and each of those categories has (will have; I’m only working with one right now) its own instance of IndexPage to display the documents in that category. Each category also has an Add page for new entries.

It’s not that complicated! It shouldn’t be this complicated! It’s still complicated!

—–

(an hour later)

As you can tell, I’m still getting my head around Kivy.

Basically, whenever you need to do stuff that crosses over different classes, you have to make your method calls in Kivy. Kivy keeps basically all the class instances in memory. This gets kinda tricky if you lose track of things though.

I do need to clean up the Kivy inheritance… and then stop bashing my head against trying to make things happen in the Python file that just can’t happen in the Python file. Sigh.

Workspaces

Here’s an excerpt from a Paul Graham essay entitled “Great Hackers“:

If companies want hackers to be productive, they should look at what they do at home. At home, hackers can arrange things themselves so they can get the most done. And when they work at home, hackers don’t work in noisy, open spaces; they work in rooms with doors. They work in cosy, neighborhoody places with people around and somewhere to walk when they need to mull something over, instead of in glass boxes set in acres of parking lots. They have a sofa they can take a nap on when they feel tired, instead of sitting in a coma at their desk, pretending to work. There’s no crew of people with vacuum cleaners that roars through every evening during the prime hacking hours. There are no meetings or, God forbid, corporate retreats or team-building exercises. And when you look at what they’re doing on that computer, you’ll find it reinforces what I said earlier about tools. They may have to use Java and Windows at work, but at home, where they can choose for themselves, you’re more likely to find them using Perl and Linux.

(This was before Python went mainstream, by the way. This essay’s from 2004 and Python’s really young–it was still obscure at the time. Python seems to be replacing Perl, probably because it’s a good first language, and the syntax looks “friendly,” and so many young hackers will have lots of experience with it. Perl looks intimidating but does a lot of the same things; I don’t know enough about it to say if it does them better.)

This passage kind of made me wonder precisely what different hackers’ workspaces look like, though. Obviously they’ll all strive to be fortresses of concentration, quiet with minimal interruption. But hackers are a blatantly nonconformist culture; individuality is prized to the point that imagining there could be a standard for “hacker workspace” is laughable.

For the purposes of this discussion I’ll extend the category of people being discussed to anyone who programs in their spare time, as those who wouldn’t normally be included in the description “hackers” really only face the barrier of time before they qualify (well, to a certain extent; there are exceptions). I’ll also include other “maker” cultures that work at a desk. To me, artists and writers are the ones who come to mind, although there are undoubtedly more that you can think of.

It made me think about my own workspace, and how much it said about me. Which turns out to be… a lot.

First, that I am a very visual person. The wrong kind of clutter bugs me. Yet, I’m willing to give up the back half of my desk space in order to surround myself with a dozen plants and a 10-gallon fish tank. This is because it isn’t clutter to me.

workspace3

Some people couldn’t bear having so much stuff in their line of vision. For me, it’s essential.

 

When I need to stop and think about something, I pause and stare for a few minutes at my fish, or I water my plants. Being surrounded by this cozy, natural background helps me work. On anything–not just code.

Conspicuously missing from my desk and the surrounding area is any sort of calendar. When my mental organization isn’t enough, I make my to-do lists mostly on the computer. I rarely forget things I need to do unless my workload is really heavy, and then I just write it down in Word or LibreOffice.

I did, in early May, make a paper list of the things I wanted to get done this summer and space to scribble down stuff about them, and put them below my desk’s clear plastic cover. It’s visible under the teapot; look how much I haven’t used it. At all. It wasn’t obtrusive enough to visually nag me (if it were, I’d have thrown it away), so I forgot about it.

I like very much to be organized. Disorder kind of makes me nuts, actually. Not the sort of disorder that you get when you don’t make your bed (I don’t care about that), but the sort you get when your mental systems, or any extension thereof, aren’t easily usable and accessible. It actually puts me in a bad mood until I can sort things out. Any system I use to do a task I’d normally reserve for my brain has to be just as organized as my brain is, or it’s like my brain is what’s disorganized. This is why I always know where things are on my bookshelves, why I clean out my computer’s files on a regular basis, and why I’m picky about how my code looks. If I have notes on a novel I’m writing, they need to be organized too. Props to the writing program Scrivener for satisfying this need–I love Scrivener.

The easiest system to keep organized is my brain itself, and I happen to have a lot of mental space for the things most people would put on a calendar or a to-do list. I think this comes from spending… about five, six years? regularly working on long fantasy and steampunk novels with Byzantine plots. I never relied much on outlines or notes, unless it was fiddly technical stuff like how many miles per hour someone’s clockwork cart was supposed to go or why something that seems unlikely happened. Funnily enough, that’s the sort of thing you put into code as comments. And, because I spent so much time learning to hold so much plot in my head, I don’t think it’ll be much of an issue when I need to hold the entirety of a long program either. Now that I think about it, it seems that writing novels taught me more code skills than I realized.

I also always have music playing. Always. I can barely work without it; I can’t have the emptiness of a sound-space any more than I can stand the emptiness of a bare desk. But it has to be the right kind of music, just like I can’t have the wrong kind of visual clutter. Right now, a YouTube playlist of about 100 nightcore songs is my poison. (Nightcore is mostly just pop and/or rock music at 1.5x speed, unless the person who remixed it actually knows what they’re doing.)

Pop music is easy to tune out, and the speed increase makes it easier to tell lyrics apart from when someone’s actually talking to me. Some nightcore is more techno or dubstep-ish, and that’s really appealing too. But it’s important that it has a solid beat, and that I can mostly tune out what I’m hearing. I speculate that the reason pop music is easy to tune out is because the people who make it realize that if folks listened to their lyrics, they would seriously question their own taste. Whatever. It works; listening to music that I can mostly tune out means I don’t hear all the other little sounds that might disrupt my thinking.

Why do hackers, artists, writers… etc, like cozy, quasi-cluttered spaces, and managers like a rather bare area specifically dedicated to business? (Which is evidenced by the fact that that’s what workspaces in companies across America look like. I don’t need to dispute the latter point; they’re the ones who chose to make their places look that way.) I’m sure they consider our desks ridiculously frilly and cluttered.

Perhaps it’s because for hackers (and for novelists too), it’s that they don’t have bad associations with work, so they don’t have bad associations with the place they work–they don’t feel the need to compartmentalize, to differentiate between their “work space” and where they have fun, because their work is fun to them. Perhaps it’s because they like work and spend more time doing it than managerial types might, so their space has to be comfortable for longer periods of time. Perhaps it’s the hackish tendency not to place value on “seeming professional.” Or perhaps it’s another side effect of how those drawn to maker professions like programming and writing just inherently think differently than people drawn to manager-like professions.

What your chosen workspace (not one that was designed by someone else) says about you is worth thinking about, because it might say something you hadn’t realized before.

Go ahead, describe or post pictures in the comments. I’ll wait 🙂

A Full Summer

I have identified the biggest gap in my knowledge and have been working on patching it. Took me long enough.

The major problem is that schools just don’t teach object-oriented programming. Sure, they teach languages that use it… they show you how to program dinky little projects in them, make Hangman games and so on. But they don’t teach OOP principles, and that’s a wall I’ve run into. It’s why I’ve never felt comfortable saying I have a working knowledge of a language.

So I went back to Learn Python the Hard Way. I got bored with this book earlier because I was determined not to skip stuff in case I missed something important (a good tactic dealing with textbooks that aren’t written so well, which is most textbooks), but the book was written with the idea that it’d be your first programming language, and it wasn’t mine. It’s also a little condescending, but this is probably justified considering the book’s target audience… you HAVE to talk down to people a little if they’re not sufficiently tech already.

Determined to learn OOP principles, I recently dived back into the book. I spent a while grinding through the first 20 or so exercises, skipping most of the study drills because I could answer the questions they posed without looking up the information, and making one or two snarky notes in the margins for the benefit of my younger brother who’ll be inheriting the book once I’m finished with it. I had a trip out of town with my parents recently and took the book along, reading it in the car and suchlike.

After reading ahead quite a bit, I decided not to bother with anything else until exercise 40, when the book starts in on OOP principles. Yes, that’s skipping a quarter of the book. No, it probably won’t help me learn Python’s syntax. But let’s face it, Python’s syntax is designed to be non-headachey and easy to pick up anyway, and it’s not what I came for.

 

Exactly a month from today is my 18th birthday. This opens up a lot to me which will keep me busy.

First, I’ll be working on getting a driver’s license. Yes, I’m in America and if I’d been more on-the-ball about things I could have gotten it before now, but I waited too long to get my learner’s permit and there are weird legal qualifications about how long you’ve had the permit before you can try for a driver’s license if you’re underage.

Second, I can apply for more jobs. It’s ridiculously difficult to get a job in my city if you’re under 18. There are only a few places that’ll even look at your application. Since I’m going to be moving out next year, and I don’t particularly want to accumulate massive amounts of debt, I need several thousand dollars in order to move into and outfit my teeny-weeny apartment (which is both cheaper and saner than living in the dorms at most colleges). This requires some planning, and, yes, a job.

I have a few places I’d really, really like to work. Particularly, I want to see if I can land a job working at this car dealership that needs techs–I haven’t seen much information on the job, but my best guess is that they need someone to service the computers embedded into their luxury cars. Maybe those computers even run Linux. That would be such a cool job–something I’d really want on my resume–and this is one job where I’d probably get to see better than minimum wage. Even if my guess about what the job does is off, finding a tech-related position would be a real boon.

 

Third, I’ll also be finding out what community college I’ll be attending next year. The one I’m attending now is mostly fine and I like a lot of the people there, but I have… a few HR issues with one of their most heavily employed teachers. Let’s just say that if you’re a teenage girl in a programming major, not everybody respects you; the teachers are not exempt from this effect, and not all of them are able to keep their personal resignations on this front to themselves. The way the school dealt with the issue left something to be desired. I won’t name names, or even reveal the teacher’s gender.

This is not an issue of disliking this person. This is an issue of, “this person does not respect me whatsoever and actively tries to create a toxic environment for me.” They teach many of the classes I need for the rest of my degree.

So I’ve been looking into finishing my AAS somewhere else. The idea of not paying this person’s salary is very appealing. However, if I end up taking their classes again, I’ll start recording the classes on the premise of wanting to listen to the lectures later. If said teacher intends to continue their disdainful attitude, I’ll have some more evidential weight on my side and won’t so easily be dismissed. Such a recording device would most likely prevent this behavior entirely, though; the teacher is too smart to allow me such evidence. If the teacher refuses to allow me to record his lectures, I’ll ask them to explain why, which will be a difficult question, especially since they make lots of videos and put them on the Internet.

Fortunately, it may not come up. There is another community college nearby with a very similar track to what I’ve already done; most of my courses will probably map.

 

Because I’ll be so busy, I’m hoping I can tackle learning OOP and get that particular project finished within the next month.

Better get on that.

I didn’t think I’d end up saying this, but…

…I’m kind of liking C.

I think the main thing is that I don’t have to use an IDE and my brain is still rebelling against all the Visual Studio crap I’ve been putting up with for the past eight weeks straight.

School classes don’t really teach you to program, I think. They give you credentials and those are very useful; they introduce you to other programmers and that’s awesome; you get access to more expensive equipment and you get introduced to parts of the tech world you wouldn’t otherwise find–that’s great. But even though I’m a programming major, they haven’t actually taught me much programming. It’s really weird. The classes hop from language to language and they don’t really focus on teaching you one–just one!–and then letting you learn other languages more quickly for having gained in-depth knowledge of programming in general.

And if they do teach more than just a bit of a language, it’s always using Visual Studio. My Java class was the exception, but again, it didn’t go in-depth. Even the web design class used (ewww) Dreamweaver. (Good thing I already knew how to write HTML and CSS correctly.)

I wish there hadn’t been so much politics in high school… wish I’d figured out I could just take their college classes and GED out sooner than I did. Then maybe I wouldn’t have spent so much energy on trying to make them let me skip classes, and I’d have self-taught more. Instead I ended up letting schooling interfere with my education.

Probably why I’ve managed to continue learning programming so long without actually entering “larval stage.” Everything was too simple to hold my attention, or I was focused on school politics, or I was being fed Microsoft’s “we won’t tell you how this actually works” crap–and while I enjoyed it even so, the obsessive learning drive that I’ve actually seen get triggered in myself for other subjects (notably psychology; I spent about a month or two in freshman year of HS binge-studying MBTI and separating the useful from the BS) never really triggered for programming. I think it has now–which is a Happy Thing, because I really enjoy latching onto a subject and spending mass amounts of time learning all about it.

Larval stage, if you don’t already know, is the hackerism term for… well, I’ll let the Jargon File explain it. I stumbled across the Jargon File about a year and a half ago and was always kind of amused by the evoked image of a sort of technological/intellectual puberty stage in members of the hacker culture. Like, you’d wind up huddled in a darkened room, in a cocoon of tech, dirty laundry, snack wrappers, and caffeinated beverages, and after you’d finally achieved a satisfactory level of expertise in computer systems, you’d “snap out of it,” stumble out into the Real World, and finally realize what happened. Then you’d just go back to coding, and your computer would finally declare: “Harry, you’re a wizard.”

Probably that actually happens with some people, knowing computer geeks. I tend to be the odd one out among geeks most of the time, though. Hopefully I can avoid some of the crazier “symptoms,” although I do need to work on being able to concentrate for long periods of time–my brain tends to fizzle out after a few hours of working on code, and the recovery time from that is longer than I’d like.

You know what’s great? It feels like spring here. I’m sitting at my desk, with the window in front of it wide open, and the fresh air and sunlight are doing incredible things to my mental clarity. I am sick of winter; Iowa winters are awfully long and cold. Not like Minnesota winters, but still. Maybe I should look at transfer colleges that are south of here. No more seasonal affective issues for me! That’d be nice.

I should find something to eat, I’ve been messing around on the computer all afternoon.

I’m in love

Everything is shiny right now and I’m really really happy I have Spring Break coming up soon because I really want to tinker with things and I don’t want classes getting in my way too much. (My online class, unfortunately, doesn’t stop during Spring Break.) I recently found a C book on the Internet which is a work-in-progress by a writer I like. I know it’s not gonna be perfect, but I’d like to think I’m intelligent enough to fill in the blanks with Internet searches and man pages, even with a language so notoriously finicky as C.

A few hours ago, I left my last 4.5-hour-long C# class. I’m so glad it’s done, although I still have some work to do for that class that needs to be turned in by Sunday, and it’s really frustrating work (naturally). I’ve already briefly ranted about why I don’t like IDEs. It’s like being forced to collaborate with the hive-mind of the Microsoft Overlords, except they won’t tell you what they’re doing, just what they say you should do, and the IDE tries to write code for you and fails epically and it’s just overall terrible. AURRREGHHHHHKKK.

Debian remains shiny and fun. I like the way it handles different windows; it’s even more flexible than OS X in its workspace design.

Also I’m wired up on caffeine so everything seems even better than it normally would. It’s a good thing I’m in a good mood because I offered to try fixing someone’s computer and she should be showing up soon. She’s got some sort of virus that’s affecting the keyboard, and she thought that a) it was a hardware issue and b) the keyboard on a laptop couldn’t be replaced, so c) she had to get a new one. I told her this wasn’t true and that if she brought it to the student lounge at 1:00-ish on Wednesday, I’d take a crack at fixing it, for free. So I have my live Lubuntu USB on a string around my neck, I have a Windows rescue DVD and Avast! and Malwarebytes on another DVD in my Bag of Holding, and a USB mouse just in case the mouse is also infected and I can get around it by introducing new hardware. If the USB mouse doesn’t work either, I’ll try using my drawing tablet as an impromptu mouse. If all else fails, I may even be able to install a certain program on the machine and SSH in? I’m not sure how that works, though, so it’s a last resort. I may have to reinstall her keyboard drivers. If it’s really bad, I can use my live Linux USB, temporarily install Dropbox, move her stuff to Dropbox, and tell her to go home and wipe the drive and reinstall Windows.

If it actually is a hardware issue, I’m referring her to someone else. No way am I dealing with that. I have very little in the way of hardware skills. I might be able to manage taking apart my cleanly-designed Mac for dusting, and I know how to plug stuff in and get it to work (usually…), but that’s about it. But I really think this is a software issue, and that falls under my jurisdiction.

It’s 1:28 and the lady still hasn’t showed up. I don’t really mind because the student lounge is a nice, quiet place to sit and code and write blog posts, but I don’t like the idea of a computer staying broken when I could’ve fixed it, especially when it’s preventing this lady from doing classwork. It’s really nice here. There are lots of windows, so there’s fresh air and natural light, and there aren’t a lot of people around, so the only noise is the TV running really B&W comedies in the background.

I’m going to go back to trying to figure out C. And Emacs, gosh, Emacs. I’m not sure whether I like it or not yet, but it’s still leagues better than Visual Screwdio.

I made a Debian VM

My other couple Linux VMs are Ubuntu with different interfaces (Adalace is Lubuntu, Eric is Xubuntu, and there’s the tester Lubuntu I made for a recent post on here). I wanted to see how another distro handled, so I spent some time on Sunday making a Debian VM. Its name is Linus, for quite obvious reasons–I didn’t have one named after him yet.

It is so shiny 😀 I’ve seen and messed around with the weird Unity interface that straight-up Ubuntu comes with and which nobody seems to like very much; I agree with the masses, it’s kind of odd. And while Xfce and LXDE both work really well in the limited-hardware environment of a VM, they’re both kinda bare-bones in a way that I like for its functionality, but not terribly its comfort in use. But I do like the Debian interface quite a bit. It’s odd not being able to minimize things, but it makes up for it with the window-switching panel.

Apart from that, Debian’s got a solid following code-wise. I don’t speak C yet (although it’s only a matter of time). I know people complain about Ubuntu’s code, but I haven’t gotten far enough down into the OS to see what they’re talking about and whether the complaints are justified.

It’ll be a while before my MacBook goes out, even though it’s an older model. It’s a solid piece of hardware, it’s easy to take apart, it’s got an aluminum case, and while 4GB is the most RAM it can take, the OS doesn’t really need anything more and the dual-core system can support my VMs. But when something does happen to it, I plan to replace it by buying a Windows laptop, which will stay a Windows laptop for only about five minutes (that is, until I unpackage it and pop in the Linux install CD, or make it into a hackintosh; most likely the former). If I can learn to hack on Debian, it might be a very strong candidate for the OS I install there.

Not to say I’m not happy with OS X for general-use purposes. It’s a solid OS: stable, efficient with the hardware, and comfortable to use. Not my favorite to program on, but you can.

I’ve already set it so sudo doesn’t even prompt me for my password. I live on the edge like that, because I totally can’t just wipe the thing if it turns into Frankenstein’s Monster on me. (In other words, putting in the standard warning: don’t recklessly do this to a machine you actually have files on.)

Updates when I actually figure out what I’m doing.