Data Structures: a rant

(If you’re curious, the textbook from this class–and the source of the explanatory links I’m using in this post–is available online free here: http://interactivepython.org/runestone/static/pythonds/index.html)

– – –

I just got out of another Data Structures class. I zoned out halfway through, which is somewhat unusual for me. Happens more often in Data Structures, because the class starts at 8AM. (Fortunately, I think I found a less winding route to cut down on my time walking to class–hopefully the shortcut will make me less prone to lateness. I am not a morning person. I tend to dream about waking up and going to class. I’ve even slept through the 10AM labs, which is ridiculous and frustrating–but also kind of understandable, because they’re on the day after the 8AM class, and my brain is trying to get rid of its sleep debt.)

But that’s not really why I started tuning out the professor’s lecture today. It was the result of another impractical implementation on the projector, at which point a thought struck me:

If these data structures are so useful, why aren’t they part of the language already?

Python (which is what we’re using, 3.5 at that) is not a dinosaur, and most of the math for these data structures was done like fifty years ago. I’d understand if the point was to get C to be more efficient, but most people don’t even code in C any more. It’s not the right tool for very many of the jobs we have to do.

In fact, this class seems closer to a language design course than something practical to software development. I know that’s the point of the high-flown “computer science” department, but… come on. Even interviewers are getting the idea that this kind of question doesn’t matter that much in the real world. It seems more to me like something to be learned on the fly, when needed. Which in practice would probably just mean memorizing Cracking the Coding Interview because you need a job.

Why does this theory class have to be so… theoretical?

I wish the teacher would spend some time telling us when to use these structures, rather than just what they are and how they’re implemented. Otherwise I think this course may do more harm than good.

Why in the world would you ever use a singly-linked list? Most languages–and especially the ones most commonly in use–have array or list structures of their own, which are 1) optimized for you, 2) don’t require extra code, 3) have been tested far more thoroughly than your code ever will be and are thus more stable and predictable, and 4) don’t confuse the hell out of other people who come in and read your program!

Why in the world would you bother implementing a doubly-linked list either, unless you’re coding a programming language of your own?! None of this makes sense! We have a dedicated class for language design! We have a dedicated class for C programming! Why isn’t it in there instead?!

Ahem. *deep breath*

Hash tables are kind of cool, and so are binary heaps (although they’re less practical). My affection for their clever hackitude is rather stifled by the suspicion that, again, they’d probably be built-in structures if they were that useful. Like Python dicts–those are hash tables behind the scenes. Use those. Everyone knows what they are and you don’t have to code them yourself.

If you’re working with large amounts of data, hash tables and binary heaps could be useful. But the professor doesn’t talk about when, just how to use them. If you’re not working with big data, chances are you just need a dict or list, and can spare yourself and others the experience of trying to interpret your weird code later.

But the professor doesn’t talk about that kind of thing. I wonder if he’s getting homework assignments that use this stuff unnecessarily. He hasn’t been taking points off mine because my work still does what the spec asks for, as clearly/briefly/user-friendly-ly as possible. I haven’t been looking for ways one might use weird data structures in the assignments, so I don’t know if they’re designed to invite us to use them or what.

He also covered recursion, which I think is very useful–again, if you know when to use it, which depends both on the problem you’re solving and the language you’re using. I will casually use recursion to make my code cleaner-looking even if it isn’t always the most efficient option (in Python). But that’s for readability. Mostly I use it when I’m getting user input, and I stick the prompt in its own method and loop if I get bad input. That lets me put all the lengthy, messy error-checking off somewhere and the main program will get back a good value.

I think this practice is supposed to be kind of evil according to functional programming, because user input functions aren’t pure functions? Or maybe, because I’ve sectioned them off and make sure they return good values, they’re exactly what you’re supposed to do in functional programming. Don’t know yet. It works, anyway.

I still use “else:” almost exclusively for “Can’t Happen” errors. It saves me headaches when I screw up the recursion. That’s a minor change with using recursion, but it’s an issue only while writing; I’ll put in extra effort when I’m writing the program to make sure it’s easier to read later.

What I will not do is write code whose purpose is to make me look or feel clever for writing it a certain way. That’s insane. Sacrificing readability, even efficiency because you think it’s cooler to use some homebrew data structure code rather than a freaking built-in Python list? That’s absolutely insane.

When interviewers select for people who know how to do this, I wonder if they realize they may be selecting for a subset which includes the actual worst candidates: the smug “Of course I know everything, if you lesser mortals don’t, that’s your problem, Google it, and also I have very strong opinions about i++ vs. ++i and will totally correct you if you’re wrong.” Fools and incompetents may eventually learn. This person doesn’t think they have to.

(Of course, sometimes a person like that is useful to look impressive in customer meetings, but in my admittedly limited experience, they’re just as likely to insult your customers as to impress them. Ever seen a bunch of startups pitch? Some of those folks need an attitude adjustment. Of course, they’re going to fail; it’s hard to have enough empathy with customers to produce a good product if you have such scorn and disdain for their intelligence. Then they’ll claim they went under because they “failed to pivot.”)

Oh, one more thing. Big-O notation is pretty useful. Even if your main use for it is understanding what other people are talking about, and/or making yourself look impressive. It’s so you can find out which of two algorithms is more efficient, which will probably be something you’ll need to do eventually. It looks way more complicated than it is.

I could very well be wrong about this, and I’d be pleased to find out if I were. I’d love to find something that’d make me a better programmer. I’d be terribly pleased to find out I wasn’t learning something nearly useless. But I don’t think that’s the case.

The CS math course I have (enigmatically titled “Discrete Structures”… I have yet to find out why, unless the reason is “because it sounds fancy”) seems a little more practical at least. Logical thinking comes pretty naturally to me, but I know it doesn’t to everyone, so it makes sense to cover it. I know there’s also set theory, graph theory, and combinatorics later on in the course, and I’ve heard those are good things to know for programming. I guess I’ll find out.

Oddly enough, it’s my English course that’s the most practical. The professor decided to forego the traditional giant clunky writing textbook and told us to order this list of like eight different short story collections, which we read and then write and talk about. That takes up about half our class periods. The other half (each day is dedicated to one or the other) is the professor talking about writing: elements of stories in general that are important (like what the stakes are–is war at risk, for instance?), writing style (like sentence structure, word choice, voice, POV), what it means to have universal appeal, what it means to capture an audience and how to get their attention–and especially the skills of critical thinking and backing up your claims.

This format is a little odd for a class called “College Writing and Research”–but it isn’t bad. I think it’s more effective than the normal route. No writer I know learned writing out of a big clunky textbook, or by doing essays on symbolism in Dickens or whether school uniforms are a good idea.

Since CS folks often point and laugh at the liberal arts, saying their study is useless bull and all those English majors should be studying something useful and practical (like computer science of course), well… I have an uncomfortable piece of news.

Not that I’m saying majoring in English is more likely to get you a job (although it’s better off than, say, Gender Studies). But knowing how to write effectively, which my English class will teach you, is far more practical than knowing how to invert a binary tree.

Sorry, prof.

Please read the comments.

Advertisements

What I Did in 2015

The Muse suggested I write one of these to highlight my professional accomplishments, especially since this blog is listed on my resume (I don’t know if that looks kind of tacky, but LGL does give a good idea of what I’ve been doing and what skills I have, so it is practical). I guess it feels a little odd for me, because I can’t remember everything offhand myself. Fortunately, I can flip back through my archives and see what’s been up based on my blog posts.

I’m not sure who this is for, honestly. Mostly, my accomplishments last year were not exactly professional, more just personal projects and so on.

Divided up into sections which are roughly the same length, for easier reading. Not all have the same number of months. Roughly chronological order because I’m using old posts to help me remember all the stuff I did last year. (It was a lot.)

January-March

Attending community college to earn an Associate of Arts and Sciences degree in Programming (have been since the previous fall).

I was in the Linux learning stages myself, and also learning to use VirtualBox. It seems like a lot longer ago than it was. I made this blog, and wrote a post describing how to set up a Linux VM. I discovered Debian and it became my favorite distro so far. I tried learning to program in C, but didn’t go very far with it because my classes became pretty difficult right after I started getting into it, and haven’t come back to it yet because I haven’t had anything I want to make that requires low-level programming. I’m still learning the high-level stuff for now.

April-May

Took a Linux class and surprised myself with how much of the material I already knew from a few months’ odd tinkering here and there. Read Eric S. Raymond’s paper “Cathedral and the Bazaar” and wrote a bit of commentary on it. Converted a Windows box into a mostly-Linux box (it has had very few problems to date, mostly from the age of old files that needed transferring). Started looking for jobs, but as I wasn’t of age until late June, most turned me away on the spot.

Oh, and I got some kind of honor award or something because I’d gotten straight As that semester. I forget what it was. President’s List or something.

June

Started poking around in the book Head First Design Patterns. (I should come back to that.) Decided I was pretty competent with Linux and wrote the post that made this blog popular–it was actually a long time in planning, starting with a cold email to ESR about whether there was a book on learning to use Linux, and a casual remark that if not, I’d throw my links on a WordPress blog or something and send it to him so he could send it to all the other teenage nerds who were probably emailing him the same question. Instead, he put it on his “How to Become a Hacker” page–which is a courtesy I was not expecting, and suddenly this blog gained a whole bunch of readers. So many that my link above is basically superfluous, because nearly all of the people reading this are reading because of that page. I can’t thank ESR enough for this, my readers are awesome.

Anyway, June was a busy month, and I definitely didn’t stop there.

I discovered Paul Graham’s essay page and started binge-reading. I decided I wanted to start a startup (which I still do, but am putting off due to a lack of cofounder candidates until I go to a 4yr university) and began mentally designing my product. I discovered TechWeek and arranged with my parents to go during September to the Kansas City event.

Also, I turned 18.

July

Finished reading the last of PG’s essay archive. Started building a cross-platform app called tinypapers, which was to be an app to store notes, business cards, receipts, and all the other clutter paper that ends up in wallets and pockets. I spent a lot of time on that. Also wrote some casual essays on the blog based on reader comments and whatnot.

August

Wrote some more essays, including a long, rambling one about software licensing and how to compromise on it for businesses that want to make money from selling software. I probably overthought that.

Worked on tinypapers some more, had several major impostor syndrome episodes, went back to work, fixed bugs, etc.

Got my first job that had paperwork attached: a 3-month internship at an engineering company. To be honest, it wasn’t really a programming job as I’d believed, and it wasn’t something I would have wanted to keep long-term for reasons I won’t elaborate on, but it was a job, it paid more than minimum wage, and it wasn’t retail or food service, so on balance it wasn’t a bad deal.

When I went back to school later in August, I started working on Raspberry Signage. If you haven’t read about it on the blog yet, Raspberry Signage is a project I designed in response to a school official’s announcement in one of my classes that our digital bulletin boards were on some very shaky, unsupported ground, because the company that the school had been paying lots of money to maintain the boards had gone out of business.

I designed a solution in which the monitors would each get a $35 Raspberry Pi minicomputer attached to them, which would be programmed to visit a WordPress website in Chome’s Presentation Mode (which hides the navigation bar). This web site would simply display a slideshow of whatever signs we needed to show around the school.

This project is my baby, and it’s almost finished. We’re going to need some real hosting, rather than just the little Apache server I set up back in one of our labs. We’ll probably want a dedicated Internet connection for them–or at least getting them hooked up to the tablet network, which is a mysterious secret thing where only dedicated people are allowed to know the credentials and whatnot, so if we go this route, I sure hope one of their dedicated people knows how to stick together some code on a Linux box. I wish I could say the school doesn’t have anyone who’d faint at the idea of using a terminal-based text editor on Linux config files so as to give the machine access to the school network… but I can’t, because there’s bound to be at least a few people who would look at that and think we were cracking the network. And then there’s the ordeal of configuring aaaalllll the different monitors with their different screen resolutions, because I don’t think I’ve seen two around the school that are alike, and RPis are not the best at auto-configuring screen resolution, so you kind of have to do it by hand.

(I probably would not have understood most of that giant paragraph I just typed a year and a half ago. My, how far we’ve come.)

Most of the programming is done, though. I just need to tweak the image I have.

Kudos to my brother Tim Yoder for doing big, big chunks of the work on this. I didn’t have access to an RPi or anything when I came up with this idea, so he was the one who found out which config files to edit. He even poked around until he found a WP slideshow theme that fit our needs. I was going to code one by hand, being green enough not to look for the pre-invented wheel first.

September-November

Attended TechWeek in Kansas City, and visited UMKC. I really liked Kansas City and decided to apply to UMKC. (My other three choices are Chicago colleges. Chicago is pretty awesome too.)

I discovered that tinypapers was basically Evernote, and “officially” stopped working on it, as I decided I didn’t need to reinvent the wheel. (Unofficially, I’d been busy with a combination of my job and a very stressful set of classes, and hadn’t been working on it for a while.) I guess I’m still kind of holding a candle for the idea that I’ll finish it as an open-source project, but I can probably find more productive things to make.

I applied to Y Combinator with a different idea that had been in the back of my head for a while, even though I had no cofounder and they’re really reluctant to accept one-person companies (they’ve only taken a few). I got turned down; oh, well. I’ll find someone who wants to make neat stuff with me eventually.

Made a GitHub account and put tinypapers up on it. Not properly, because I had no idea how to use git at the time. It’s since been cleaned up.

December

Volunteered at my school’s “Plant Yourself in STEM” event, where we make a day out of the Hour of Code program and run other programs on the same day. I ran a Linux activity both days we held the event. My activity consisted of this game I wrote, this FAQ I wrote, and my giving a little mini-speech on what Linux and open-source was all about. It was a very successful event, and I’m proud of the work I did to help make it happen!

I also learned the basics of git and cleaned up tinypapers’s GitHub repository.

—–

Anyway, that’s what I did last year! Which also makes a history of this blog, basically, since it started in March. That reminds me: I have to figure something out for the blog’s first birthday.

It was really interesting reading through some of my old posts. I have poor emotional memory, but I’m also a good writer, so it brought back a lot. I’m remembering how much fun it was to work on a big project with big aspirations, and it’s making me want to go back to that. Maybe it won’t be tinypapers, but I want to get back into something big I can work on for eight hours straight on weekends and stuff, because that was a lot of fun.

Post in the comments below: what did you do last year that you were most proud of? It can be your proudest programming-related moment, or just your favorite accomplishment.

Signing off, and happy hacking!

–Rebekah

 

There’s a cool new open source project in town

It lives here and it looks neat 😀

It’s called braindump (also capitalized BrainDump), and for now, it’s a note app on that web site. However, the creator, Levlaz, says it’s just a proof of concept; he wants to make a “notes platform” out of it. I’m not entirely sure what that means, but he’s planning to elaborate about it later, over at his dev blog.

For your code curiosity convenience, braindump’s website and GitHub repo are linked over at my Links page, so you don’t have to hunt down this post if you lose a bookmark or whatever.

It is certainly not perfect. To me, this is part of what makes it fun, though–that it’s alpha-release, small enough to tinker with, easy to see what it’s supposed to do, and that it still has bugs to hunt down.

Have fun, readers! 😉

I poked around and learned something new

Story of our lives 🙂

I’ve been fiddling around trying to figure out git, which so far isn’t as complicated as I thought it was going to be–but I haven’t really done anything difficult with it yet. However, I did fix the crummy job I did of putting my tinypapers code on GitHub. My previous versioning system was done with directories rather than git, and while it worked okay for what I was doing, I really should know how to use git.

Anyway, I haven’t changed the name of the GitHub repo (although I did delete it and reconstruct it), so any links on the blog should still work. For your convenience, though, it’s here if you want to poke around and see what I was doing or if you’re learning Kivy and want some example code. I still haven’t specified licensing because I’m not sure what to do with it and don’t feel like reading up on what license I’d put on it. If someone here wants to use what I wrote as part of something else, tell me in the comments. I don’t think it’s worth much to other people as it is right now, though.

Valuable to me, though. Looks like it’s still teaching me things 🙂

Oh, by the way–I had been trying to use the GUI application for GitHub before. It’s actually a pain, don’t bother with it. Using the command line is a lot simpler and cleaner.

I want to write up my activity plan for the Linux thing but my uterus is throwing its monthly temper tantrum and I’m not feeling the greatest. Tomorrow should be better. Here, have some nightcore.

I think I’m going to rewatch Death Note and knit.

Plant Yourself in STEM: Linux FAQ

I. Questions about Linux

Q: I want to play with Linux some more.

A: Great! You have a few options.

  1. Use a virtual machine. Here are my instructions on how to make one. I recommend this one most because you can run the software well on most modern systems, and there’s no risk of accidentally overwriting Windows or whatever you’re running, and losing all your files in the process. Also, if you break a virtual machine, you can reload it from a snapshot or just make it over again. VMs take a little patience to make the first time, which is why I wrote that tutorial. (It contains a lot of stuff I had to learn by trial and error.)
  2. Use a live CD or USB. Google is your friend on making these, but check at least two tutorials when you make Linux-related stuff. Be careful not to install it over your current system.
  3. If you have money: get a Raspberry Pi and its associated accessories. This can be fun, but you’ll probably end up dropping quite a bit of cash on it. If you want to anyway, again, Google it.
  4. If you REALLY know what you’re doing and this is your own computer, not your parents’, you can make a Linux partition. Be careful with this one. You have to be a little more technical to get it right, and it’s risky to get it wrong. You might want to choose your distro a little more carefully with this option too, to make sure it’s one you like.

Q: What’s with all these different “distributions”?

A: Linux distributions, or distros, are just different varieties of Linux. They all have the same stuff running at the core of the system, roughly, but they can have different software installed and sometimes different commands. Each distro is meant to serve a particular purpose.

Ubuntu and its variants (Kubuntu, Xubuntu, Lubuntu, etc) are meant as a beginner’s Linux–they’re designed to look roughly like Windows and be as easy to use as possible. Linux Mint has a clean design for users and programmers who want something simple, elegant and effective, without tons of shiny graphics. Debian and Fedora are often used in servers or on the personal computers of programmers. Kali is for network security administrators. There are even advanced distros such as Arch and Gentoo, for increased customizability or transparency to the core system below–Arch doesn’t even come with a desktop environment installed, you start out with just the command line interface.

It’s best to start with a simpler distro, like Mint or Xubuntu (which is preferable to normal Ubuntu because of the interface it comes with–it runs faster and I think it looks better). I’m fond of Debian, personally. GNOME 3, the window system it comes with, is rather heavyweight but very shiny. You can put different interfaces on it, though.

Q: Wait, what do you mean “interfaces”? What’s a “window system”? Are they different things?

A: In Linux, the command line is the default interface that’s built into the system. But you can put window systems over the top of it. You know how Mac desktops look different from Windows desktops? Like, the windows look different and Mac has the dock instead of the taskbar? That’s because they use a different window system. Linux has tons of these and you can just swap them around.

“Interface” is a more general term than “window system”–the command line is an interface but not a window system. (Apart from that distinction, they’re interchangeable as far as I know.) That’s semantics, though.

Q: What makes Linux so great, anyway?

A: Lots of things! There are so many reasons to use Linux over Windows (and, to a slightly lesser degree, over Mac)–ranging from the practical to the aesthetic to the philosophical. Here, I’ll list a few of the reasons you probably care most about, but understand that this list is by no means exhaustive.

  1. It’s free! Not only are the vast majority of distros free to download and use, but you can change them however you like or make contributions to them.
  2. Linux is faster, especially on old hardware.
  3. It’s far, far more secure than Windows. Linux very rarely gets viruses, even more rarely than Mac OS X, and when viruses for Linux do appear, an update comes out very quickly to protect the system. But it’s hard to write viruses for Linux because it’s designed so well.
  4. They’re easier to program on. Linux comes with better tools for coders and makes things a lot easier. Tools like git and shell scripting make Linux a far better choice than Windows for a coder.
  5. Linux has a powerful command line, which Windows lacks. (Mac’s command line is okay though.)
  6. Package managers make it easy to install and remove software without leftover files like you get on Windows and Mac. This saves space on your hard drive and keeps your programs working well.
  7. Linux is easy to use and customize! You CAN learn to use Linux without touching the command line (although you’d be missing out on a feature, and if you’re coding you should know it). The basic controls aren’t that different from any other operating system–it just has a few extra tricks it can do.
  8. Linux is becoming a platform for gaming! It’s not totally there yet, but there’s serious progress being made. Steam has certainly jumped on this bandwagon with Steam OS. Personally, Humble Bundle is my favorite place to find Linux games, and it’s for a good cause. And remember what I said about Linux being faster? Your games will perform better. It’s pretty awesome.
  9. Free software–you don’t have to pay for Microsoft Word or Photoshop, as Linux has open-source software that does the same thing. LibreOffice and GIMP are great programs.
  10. It’ll teach you about how computers work! Linux is a great behind-the-scenes of how computers function. To me, that’s really important and cool.
  11. Free support from a great community. Got a question? Google it, and if you can’t find anything to help you, there are forums full of people who’ll help you out for kicks–they just like fixing stuff and making users happy because it’s challenging.
  12. The power to fix your computer when it breaks. Windows doesn’t let you see where stuff is failing, it just pops up with the box that says it’s trying to diagnose the problem and fix it–and I’ve never heard of that working for anyone. Linux lets you see what’s going wrong, if you know where to look, and lets you fix it instead of making you give up. Linux boxes don’t really get the kind of issues that can be solved by rebooting–they work too well for that–but they do occasionally run into bigger blocks where Windows would just throw up its hands and tell you to reinstall.

I’m stopping there. Twelve is a nice round number, and I don’t want this to go on forever.

Q: How do I learn Linux?

A: This is actually a really good question. I was asking the same thing about a year ago. Now that I know from experience, I’ve covered it to send you in the right direction.

II. Questions about coding

Q: How do I start learning to code?

A: Starting to code is easy! There are great sites out there to help people take the first step into programming–I like codecademy–and there are plenty of books too–like this one, which is available for free (although I suggest buying a hard copy or tipping the author if you can). If you’re intimidated, you can start with HTML and CSS and make some basic web pages, in which case I recommend this book.

Q: I’ve been coding for a while… I know a language or two, but I feel like I’m missing something. Open source is really hard to get into and everything is confusing.

A: Basically everyone feels like this after working with books and classes and tutorials for a while. It doesn’t go away with more books and classes and tutorials. It starts to go away once you try to build stuff on your own. Keep your eyes peeled for stuff you think you might be able to build, and then try to build those things. Even if they’re terrible at first. Trust your ability to learn what you don’t need in order to finish your projects.

You’ll feel stupid. You’ll think your program sucks. You’ll get frustrated working on a problem and walk away. But then you’ll figure out something that might be the answer while you’re making dinner and you’ll rush back, and you’ll put it in, and maybe it won’t work but sometimes it does and sometimes it helps you figure out what works, and everything is exciting again. And you’ll forget you were making dinner, and you’ll keep coding and forget to eat at all while your cat eats the lunch meat you left out.

If you love it anyway, you should keep coding.

At some point, after months spent alternating between frustration and excitement, it’ll hit you that six months ago you would have absolutely no clue about anything you’re doing now. You’ll realize that, although you may not be as good as the open-source folks yet, you do know a lot of valuable things that would massively confuse most people.

Q: Uh… really? It’s that hard? But I bought a book that says I can learn Java in a week.

A: You might be able to learn Java syntax in a week, but it’s really just another tutorial. Programming is a separate skill, agnostic of any one language but tied to all of them, and it takes time and effort and trial and error to learn. Also, don’t start with Java. Start with Python, Ruby, or web development.

Q: Is HTML a programming language?

A: No, not really. HTML is a markup language (HyperText Markup Language), and it isn’t Turing-complete. That is, it lacks the different logic structures that programming has. HTML is more just a way to tell the computer how to display stuff, and the things you write with HTML aren’t interactive. To make interactive web sites, you need to use a programming language like Python, Java, PHP, Ruby… etc. You don’t think about it, but most websites you use on a regular basis have tons of programming behind them–it’s not just HTML and CSS.

CSS isn’t a programming language, either. Same deal, I’m afraid.

One could argue that they are both coding languages, though, in that you’re using an artificial language designed for computers in order to tell computers what to do. That’s valid. One speaks of “HTML code” after all.

III. Inevitable diversions

These are here because I don’t want to spend activity time on them.

Q: Can I use Linux to be a l33t hax0r and break into computers?

A: Yeah, if you’re an idiot who can’t figure out anything more fun to do with your computer than break into someone else’s. It’s a lot more technically difficult and interesting to build things rather than destroy them, and it also pays more and doesn’t get you into legal trouble.

Also, that’s not what a hacker is. You’re thinking of crackers. Hackers are the people who build open-source stuff, and they don’t like it when you mix up their names with criminals.

Q: Will you teach me cracking?

A: No.

Q: Should I use Kali Linux as my desktop OS?

A: If you want to be a white-hat, it makes sense to know Kali and the network security tools it comes with. I wouldn’t recommend it as a desktop OS, though. A lot of people are attracted to Kali because it sounds edgy, though, and that’s not a good reason to use it. Don’t do anything stupid with Kali.

Q: Do girls code and game in their underwear?

A: Yes, but where you get it wrong is in thinking that it looks remotely attractive.

Q: What are the best energy drinks? Is Monster good?

A: I covered this, actually. And no, Monster is toxic waste–Full Throttle, NOS, or Venom are much better.

 

Frustration and solving problems in the shower

I’m really wary of how dangerous it is to my productivity to write blog posts every day, but there’s a reason I don’t stop–which is because it only looks/feels dangerous. As leery as I am of sitting down and writing for two hours every day like this, I know that if I denied myself the time to swap out what I’m thinking, I’d have a lot fewer ideas for solutions.

I am just DYING for a cofounder with a real working knowledge of Python. I really like programming… but I don’t feel like I’ve ever gotten to a point where I really, truly understood it, and I’ve been absolutely unable to find a teacher, and the Internet isn’t as useful as one might think if you don’t know the right questions to ask, or the right way to phrase the questions you have.

I’ve run into this sort of problem before, and tried to fix it for other people (see the post “How I Learned Linux”). I guess it’s inevitable that I’ll write “How I Learned Python” and include all the stuff I’m bashing my head against now.

And it’s really stupid stuff. Like, I know full well that anyone who’d written an actual application (I don’t mean little scripts or toy programs) would be able to answer my questions in an instant if they were standing over my shoulder. [Edit: actually, they wouldn’t; my problem was more obscure than I thought.] Alas, there is no one standing over my shoulder; alas, I don’t know if I can describe my problems.

I think I might need to go trawling through some Python source of an existing program. The trick is finding an example that shows me what I need… argh.

This is one of the things I like least about living in Iowa. I live in a fairly mellow little city where the people are friendly and the Oriental food is excellent. But it’s not really a college town; we’re short on programmers. Oddly enough, I’m kind of missing a few guys I knew in high school who would have made really good cofounders. I wonder where they are now. Probably MIT, they were really smart programmers. (I had crushes on both at different points; it didn’t hurt that one was really physically attractive and the other was adorably nerdy.) Eli, Gordon, drop me a line if you’re reading this.

The problem I’m having right now–although it isn’t by any means the only one I’ve come across or the only one I’ll have, or even the only one I’m having now–is a dumb little OOP-type issue.

When this one button is pressed, I need other widgets to react to it. I have methods in those widgets’ classes that provide the reaction instructions, but one of their required parameters is an instance of the class they’re in.

I think the problem I’m facing is that the application is re-rendering the widgets that I need names for every time they’re constructed, and I don’t need it to do that. I think maybe there’s a way to do this with Kivy’s ObjectProperty stuff, but I haven’t gotten it to do that yet. I’m sure I’ve seen it before… but I don’t remember where or how. I think it was the Kivy book, but I might be wrong.

Actually, it’s not a dumb OOP issue. It’s a Kivy issue, and I can forgive myself for not knowing what I’m doing. In Python you’d be spelling things out manually and you’d have the objects available to pass. I think this is why I was having trouble finding Python source examples.

tfw you need to have a little more faith in yourself

And once again, having written out a blog post helped me solve the problem. That and taking a shower in the middle of writing this. It took me a lot longer to write this than it looks like; I spent a lot more time chasing thoughts in circles than typing.

To be honest, I was able to get the app to do what I wanted already, because of the lack of syntactic salt in Kivy. But the solution was really klugey and I didn’t like it [1], and I’ve always been a perfectionist since I was a little kid. The way I forced the app to do what I wanted blurred the lines between the Kivy and the Python code too much for my liking.

But I appreciate that Kivy gives the freedom to do stuff like that anyway; it really helps test things. I was actually going to give up on this for now and move on, but then I remembered the ObjectProperty thing in the shower.

This is still way more fulfilling than the noddy little programs from school. I’m kind of brain-tired and frustrated, but I sprang back from demoralized within an hour or so. School programs and (I’ll assume) work programs don’t have this factor that brings me back from demoralized. This is why I want to start a startup.

I guess the lesson here is that I need to be a little easier on myself. I mean, I’m an 18-year-old girl going into my second year of college. It’d probably be my last semester if I’d taken classes this summer, and even so I’ll probably graduate before I turn 19. I shouldn’t doubt my intelligence.

I probably shouldn’t be so hard on myself about my pace, either. I know from empirical evidence that when it comes to stuff like this, I’m a persistent little snot. (On multiple occasions, this was to the frustration of school officials.) I don’t mind changing my approach if something isn’t working, but if I want to do something, there’s not a lot that can stop me. I never let high school tame me. I tried to tame it instead, and when it stubbornly resisted, I took the advantages I could from it (about $2000 of free college, I think) and then left.

But, arrrrggggghhhhh. I want to go faster. There are features I want to implement. Grr.

I’ve been fighting this thing all afternoon. It’s time to take a break and maybe get some food… I don’t think I’ve eaten for five or six hours, so dinner and a few rounds of 2048 or something are in order.

—————————

[1] I have no idea where my sense of design in programs came from. Certainly not experience. I do know that I can’t remember anything I’ve ever written under Windows has triggered its appeal switch (probably because those programs were all for class and most were written in Visual Studio).

Another tinypapers update

 

I’ve been working on tinypapers for a little over a month, if you count the time I spent mentally designing it and the time I spent on learning the basics of Kivy. I still feel kind of nervous about things, because I feel like I’m not much of a competent programmer. I could hope this is Dunning-Kruger effect, and not that I’m actually incompetent, but I’d be deluding myself. There’s a lot to programming, and while I know a lot more about it than the newbie geeks running around the college right now, trying to get signed up, I also know there’s a ton I haven’t gotten to.

I’m staking a lot on my learning ability, here. I know I can pick up the basics of a new programming language in a few weeks. Certainly I can learn the things a class on a programming language teaches in half the time they teach it. But there are things that aren’t taught in those classes, things that aren’t really taught in books… things you have to pick up on your own. I haven’t learned those skills from programming side projects. I came across this profitable little idea before I started on a side project of my own… which is mainly because I was waiting for a way to learn something that can only be taught by doing.

So I guess I’m doing. I’m investing a lot of my time and energy in a really inexperienced fledgling hacker, though.

I am used to making stuff, though. I wrote novels for years, and while I had a bunch that never got beyond two pages because I didn’t like the idea after trying it out, I also managed to turn out about a novel per year (of varying quality) for years–and I started at age ten. RPi Signage counts as a sort of side project, but it’s not very programming-intensive either. I have a fish tank that can go for months without water changes, because it’s as close as you can get to an ecosystem in a box. And of course there’s this blog. I’m good at making things. But I think this is the most complicated thing I’ve tried to make yet.

I’m also not going fast enough for my liking. I work on tinypapers nearly every day for at least a few hours, if you don’t count the time I spend thinking about it… but that’s not startup speed. That’s just the learning speed I’m accustomed to from self-teaching things. I’m still learning, and that takes more energy than building when you know better what you’re doing, so my mental stamina is kind of ehhh there. But my competitors aren’t going to care about that. This project can’t just truck along. It needs to fly.

I have a new goal: I’m going to aim for having a working prototype in two weeks. Just something that has really basic features and probably not a very pretty UI. If I could get a prototype out when tinypapers is only six weeks old, I’d have an easier time convincing myself that I can handle managing a startup.

My gut says three weeks is a more reasonable timeline, considering I’m only halfway through the Kivy book and I may soon be pitching the RPi Project to the Honors Committee at school in order to get credits for working on it (which I think my advisor cares about more than I do; I just want to do it), but I’d rather stretch a bit. Two weeks it is.

School starts three weeks from now. Hopefully I’ll be able to make some new friends and see if there’s maybe a cofounder out there. There are 8,000 students at my community college. I’d say only 600 of them are in techie majors, half of them are programmers, half of those are mostly just interested in game design, and a third of what’s left are adults with ~responsibilities~. The question is, out of the remaining 100, is there someone who’d be willing to run off to San Francisco with an 18-year-old girl and write software and try to convince people it’ll be worth millions of dollars when it’s done?

Then, of course, there’s the thing about whether they’re the sort who won’t take a girl seriously in tech. It happens. Less than 5% of the group I described are like that, though.

I do have someone in mind. Actually, two people I might ask about it. But I don’t know either of them terribly well. One of them is someone I’ll be working with quite a bit more because he wants in on RPi Signage, and I’m angling to be in charge of that. My current friends… well, either their skill set and circumstances are incompatible with what I’m doing, or they’re really not people I’d choose as cofounders.

Wish me luck.