Coming together

We’ve been working on our final projects for a couple of weeks now.  At first my project seemed a cool, though insurmountably large, task.  Christian assured me that he believed I could do it, and complete enough of it to have something to show at our Demo Day/Career Day/Speed Dating Day (when we will have a chance to talk about our projects a bit with representatives of companies who could potentially hire us).  I was incredibly skeptical that I’d have anything to show at that point, but I was going to try anyway.

As I’ve already mentioned, that first week was incredibly frustrating. Once I finally collected the data I needed from the user, and could (temporarily) ignore javascript and ajax altogether, I finally started working on how to figure out which keys a user meant to hit versus which they crossed over incidentally.  There are so many ways to do this, which made it daunting in itself. Which is the best way? What even determines the best way?  Do I optimize for speed of processing?  Or just try to get as accurate a prediction as possible? Do I implement a few steps of word-filtering along the way, and hope that increases accuracy?  Or do I risk getting the wrong word, the more filters the input passes through? And how on earth do I account for letters that a user meant to hit but missed?

Christian suggested just picking one that seemed to make the most sense, that was the easiest, to start with, saying I could optimize later.  OK. Ultimately, after a few days of toying with some ideas, I picked one to start with; vectors between points, angles between vectors, and selecting only the non-trivial angles as the points where I’d count a ‘letter’.  I will deal later with double-letters and with letters crossed over in the path from one turning point to the next.   For this, I had to brush up on vector math, which fortunately came back to me fairly quickly.  Christian thought I’d need to get the rate of change of the angles(between vectors between points), but I didn’t think that extra step was entirely necessary… so I just tried it my way. Just to see.

It worked better than I’d hoped it would- and I’d picked an arbitrary angle threshhold on a whim!

It seemed, up until this point, that my project was very difficult, and I wasn’t sure if I was up to the task.  The moment I tested my method on an actual swipe input was a watershed moment; after that, everything seemed eminently doable.  I had a produced a result.  It wasn’t perfect, I was capturing more letter-moments than were strictly necessary, but I could adjust the angle threshhold, I could write a function that would filter out the unnecessary duplicates, I could implement a spell checker, I could address the intentional double-letters and the missed letters en route from one corner to another… and I could pick any one of those to do and execute, independent of the others. Now that I had something to show, everything else was an exciting bonus puzzle I could add on in whatever I wanted. It was a really heady feeling, one I wouldn’t mind getting used to.

It was also at this point that I realized exactly how much larger the scope of our final projects is than any of the projects we’d done before. In the course of collecting the swipe data, interpreting it, and beginning to implement a spell checker, I’ve done, as a matter of course and in 20 minutes of work, tasks that would have been an entire day-long project, earlier in the course.  Tasks that I would have had a walk-through to follow, tasks that seemed bafflingly large themselves, too.  One such task entailed collecting a list of all the words in a text file (comprised of 10 or so of my favorite books that are in public domain, thanks to Project Gutenberg), stripping them of extraneous punctuation characters, and listing frequency of occurance for each word in descending order. This took a whole day, a month ago. Now, it took 20 minutes. I could make it better, sure, and I plan to- but it was as doable as writing in english. How far we’ve come!

I feel like my project is coming together, and that I will have something to show for my efforts in a week.  I feel, increasingly, that I can do this; that I can contribute meaningfully to a code-base at a job, with a little bit of ramp-up time.  I am still really nervous about interviewing, networking, and finding that next job, but it’s wonderful to feel like maybe, someday soon, I won’t be an imposter when I put “engineer” on my resume. I’m still hoping someone else will put that on my resume for me, though; as comfortable as I’m becoming with coding, I don’t think I’ll ever be comfortable writing my own resume.

Posted in Uncategorized | Leave a comment

Infinite cosmic power!

Oh. My. Gosh.

A week and a couple of days ago, we were finally introduced to the wonder that is List Comprehensions.  I think I’m in love.

I promise I won’t forgo for-loops entirely from here on out, but the world just got a whole light brighter for me! INFINITE COSMIC POWER…  Itty bitty coding space!

Other than my new-found affair with list comprehensions, a lot has gone on in the last 2 weeks.  I’ve entertained and discarded a half dozen final project ideas, and arrived at an ultimate project plan.  I’ve had days where I was convinced my project was going to be a total failure, and days where I felt entirely awesome and talented, and a few points in between the two extremes.  I’ve started a list of future projects I want to accomplish, bounced ideas off at least 10 people, and gotten really excited about the post-Hackbright possibilities.  It feels like a whole lot to have going on in a week and change.

I ultimately decided to re-create swype, in-browser.  I’m using flask for my web framework, python for the back-end algorithms, and javascript/jquery for the touch events.  It’s been frustrating dealing with the intersections of these technologies, and I’m arriving at a place where I almost feel like I’d be better off doing the whole project in javascript (my comparative inexperience notwithstanding), but at this point I’ve written a couple of hundred lines of python code, and I don’t want to back-track and try to re-do all of that in javascript now, if I can help it. A lesson learned for the future.

I also struggled with my learning curve on this stuff, last week; it was the first time I was really using javascript for anything substantial, my first time using jquery and ajax, and I was entirely stumped by how they work, and baffled by the documentation I found on them.  Christian was incredibly helpful during this time, explaining things that completely stumped me, or telling me where to look for more information. I was left feeling, though, like I couldn’t have accomplished any of it on my own.

Christian, and one of the students from the previous graduating class, assured me that no one programs in a vaccuum, and that using resources like stack overflow and mentors/colleagues.  I still am not entirely comfortable with it; I feel like it’s kin to plagiarizing, but I guess as long as I know exactly how everything works, and I adapt it to suit my needs,  it’s all open source and I’ll give credit where credit is due.  I’m still not entirely comfortable with it, though.

This python-html-javascript back and forth has given me a much more concrete idea of python can be integrated with the web, and why javascript is a valuable (if frustrating) language. Front-end is where I’m weaker, so being forced to deal with this can only make me a better programmer in the end.  I have to admit, though, that I can’t wait to be done with that part, so I can get to the fun stuff; the word prediction algorithms!  I love that I get to do something exciting during my days.  I can only hope any job I find after this is a fraction as fun as learning has been.

Posted in Python Development | Leave a comment

Geeking at the mouth

OK, I so very much enjoyed this exercise Charles wrote on identifying functions, I just had to give it its own post.  I’m positively geeking at the mouth about it.  I already love puzzles, so I was hooked from the start.

Each function does a specific thing, but what it does isn’t clear from the function name, comments, or variable names.  We just had to figure it out for ourselves.  I adored this exercise for so many reasons, some being the inclusion of math patterns I love, functions we’ve written before in different ways, and functions I know exist but didn’t know how to write.  However, the most exciting part was the moment of epiphany when I suddenly knew what the function did, not because I looked variable by variable, and line by line, at what happened in the function, but because I understood a block of code at a glance.

It reminded me of when I was learning italian in college and finally started to think in italian, rather than translate from english to italian in my head. What a heady feeling that is, to feel for a moment like you’re a native in that language!  I was flying so high on this feeling, I was positively bouncing in my chair for the rest of the day.

Even when some of the mystery functions frustrated me (cough, cough, recursive functions, cough), when I ultimately figured out how it worked, I was over the moon.  Most of the functions were ones I’d never seen before. Many of them, I probably couldn’t exactly recreate right now, but I remember how they work, which is a decent first step, I think!

If you are anything like me and love puzzles, check them out.  I hope you enjoy them even half as much as I did.

Posted in Uncategorized | Leave a comment

Gratefully accepting help

I’ve had some great teachers in my life who have helped me grow as a person and as a student.  This is the first time, however, that I’ve had a mentor outside of academia.

I don’t know quite what to do with myself, with all these resources!  Everyone around me is highly skilled and fantastically helpful, and so interested in seeing me succeed. It’s so gratifying, and so invigorating. It amplifies my geeking out, 10-fold.

A mentor, though, seems like such a special role- someone who not only doesn’t mind if I pester them with questions, but welcomes it! It doesn’t hurt that my mentor is really approachable and friendly, already.  I must remember to regularly thank (Hackbright co-founder) David Phillips for pairing us up; I think he did an excellent job.

Today, I met with my mentor for an afternoon, talking about  the best way to get a start on machine learning, what I want my final project to be, and how to bridge the gap between using javascript as an all-purpose language and accessing the cool features it brings to web pages.  I was so scattered, going in, with my thoughts pulled in a thousand different directions.  He was a thoughtful and helpful sounding board, and pointed me towards some helpful resources.

He also insisted (in the kindest possible way) on looking at the task list I’d created last week (there’s version 1 and version 2), since I’d mentioned how ugly my partner and I had made it look (for fun).  Even though I knew I’d done it purposely, and that I was just fooling around in the css, and it was also our first web app, I was already terribly embarrassed about it.  Also, terribly embarrassed about the fact that I didn’t have ANYTHING installed on my computer yet; sqlite3, flask, or git.  Really, Nicole?  For shame.

But my mentor was really nice about it, and totally willing to help when I couldn’t figure out why the flask install wasn’t working, and was appropriately amused by the photo of a cat rolling around in 20 dollar bills that we’d put on our task list main page.  Who knew there were SO MANY hilarious cat photos on the internet?

Periodically throughout the afternoon I felt odd, felt like I was imposing on my mentor’s time when he could be doing so many more productive things than explaining how running ipython was different from just running python from command line.  I will need to continue to work on being OK with other people investing time in me.  It feels like such a luxury, to have someone who does what I want to do, who wants to help like this! I want to simultaneously take the most advantage of this opportunity and also not waste his time at all.  I guess it’s up to me, then, to put our time to good use.

Coming out of the afternoon, I felt like I had a little more direction (a jquery tutorial and a book to read on collective intelligence and machine learning) and a few more things figured out.  I learned some things, and gorged myself on babybel cheeses. I know there’s still a lot of work ahead of me, a ton of stuff to learn, but with so many people rooting for me, I’ll surely get through it alright.

I think this is afternoon going to become a habit, and I wouldn’t have it any other way.

Posted in Uncategorized | Leave a comment

Part the third: in which our heroine experiences disquiet

I’m now 4 weeks in to this great learning adventure, and am increasingly daunted by the breadth of tools I need to be comfortable with now that my work is no longer contained to a couple of .py files.

It was one thing to be getting to know python more each day, and to learn some CSS and HTML as a brain break.  It is a whole different world, now, incorporating all of the above with Flask and Jinja and SQLite3, not to mention knowing that I’ll need decent javascript skills, and familiarity with APIs, too, before I can even conceptualize what my personal project will be.

“Why the sudden shift in perspective, from heady exhuberance to such trepidation and insecurity” you ask, if not in so many words.

We’re finally starting to pull the pieces of this crazy world together, and that’s the hard part. Like recalcitrant cats, the languages are just a lot to keep in mind at one time, never mind integrate with each other seamlessly.

This week we used all of the above to create a Task list, in a couple of different ways.  The exercise itself was great; we went through everything the ‘hard’ way, function by function, with lots of duplicate code and redundancy.  We customized it as we went, adding features we thought would be useful.  The walkthrough Christian wrote for us explained why we were doing what we were doing, and gave us the opportunity to ‘push’ ourselves by not relying on the spoilers he provided.  Sometimes, we could use the spoilers to just confirm we’d done things the same way as Christian.  Other times, I frankly had no idea how to go about what he was suggesting we could do… though once I checked the spoilers, I could definitely understand what was going on.

Once we’d built the thing once, start to finish, we went back through and cleared out a bunch of the duplicate code by making sub-routines of the really boilerplate stuff.  Then, we finally introduced some structure into the spiderwebbed mass of functions we’d built. I’d never felt so happy to be doing housekeeping.  Things made SO much more sense when moved into related classes; functions relating to user attributes and actions moved into a User class, and things relating to tasks themselves became part of the Task class.  The organization made the whole file a lot more comprehensible.

May I always be self-aware enough to write comprehensible code.

Ultimately, the SQLite table-building we did by hand was also thrown out the window; thank you, oh brilliant developers, for making tools to take care of that for us!  I’m glad we went through everything the hard way, to really get a handle on how the database is set up, but I hope I don’t have to do it by hand too often in my life.

Keeping the model file consistent, as we made these changes in structure, was complicated enough, considering how many functions referenced each other.  Keeping the css, html, and python files all  in order, referencing the most up to date names, was a real stretch for me.  As we changed how we handled each function, each database query, it was really easy to get confused about what was going where. Ultimately, through the help of some syntax errors and friends, we had a functional task list with some (purposely, humorously) awful CSS. At least we got to include some ridiculous cat pictures.

I found the exercise really helpful, but ultimately, I’m still worried about being able to put all the pieces together, myself, without training wheels.  Christian assures me that it will come together in the end, and I’ll be able to do it on my own.  He’s not been wrong so far, so I’m reluctantly withholding judgement on my ability to grasp everything in the 6 short weeks remaining.  Everything I’m learning is still fun, and fascinating, and enriching, and I wouldn’t be anywhere else for the world.  I do hope I’m up to the challenge, though.

Posted in Personal Journey, Python Development | Leave a comment

Learn all of the things!

This morning I learned regular expressions.  Around 2 hrs into the exercises a had a sudden moment, looking at some expression that consisted of a line of seemingly random characters.  There were letters, numbers, slashes, brackets, braces, and parentheses making friends with one another, and I could READ it. I knew what it said! Two hours beforehand, I would have been utterly lost. It would have looked like gibberish.  Now, it makes sense; this is a remarkable thing, to me. How rewarding!  Check out this tutorial; I thought it was great.

I’ve experienced this wonder on so many levels, lately.  Every day I learn something new; today, regular expressions and the basics of SQL.  Two days ago, it was Python classes.  I can’t believe that I’m learning so much so quickly.  It’s a heady feeling, and I love waking up in the morning wanting more.

This evening, we started a new Hackbright tradition: a Mentor Mixer.  Each mentee was paired with a mentor who is a developer in the area; David matched us each with someone who he and Christian thought we would pair well with, taking into account where we live, what we’re interested in doing, and what companies we’re interested in.  We’ll touch base fairly regularly with these mentors throughout the rest of the program.

Socially awkward as I am, I viewed this with trepidation and excitement. Who would be my mentor?  What kind of things do they work on? Would I be able to hold a conversation with my mentor and not feel like an idiot?  The answers, in order, are: A really nice and approachable guy named Chris, a travel search site I already use on a pretty much daily basis, and YES.  Well, I only mildly felt like an idiot, but that’s a pretty good day, for me.  I’m already really excited about what I’m learning, but getting to talk about it with people who already do what I want to do just energized me all the more.  This is an amazing positive feedback loop I’m experiencing!

In a turn for the entirely unphilosophical, check out this game I made with Sara yesterday!  We were supplied the game engine (though we tweaked it in a couple of places) and the core, and we created the guts of the game.  To play it, enter the following in Terminal or whatever windows users have that’s equivalent:

python engine.py maps.txt

We spent around a day and a half on it, cramming as many cool plot devices and game elements as possible.  This was an interesting exercise for me, as I’m usually concerned about getting things right and making them perfect. Instead, we just had to do what we could in the time we had, and we ultimately decided to try as many things as we could in order to get used to doing them.  I’m proud of what we did, though I would like to someday clean it up and expand it.  Look at me, 2 weeks in and accruing technical debt like a pro!

I am so excited about where everything is going.

Posted in Personal Journey, Python Development | Leave a comment

Here goes!

For someone who has always been in love with the written word, and a consumate consumer of narrative, it’s surprisingly hard to contribute even a single post to the ocean of text already out there in the great wide world, whether on the printed page or stored on a server somewhere.

I’ve recently begun a new step in the Nicole recipe, though, and I think it’ll be important to document my progress through it.  Important for me, that is, when I look back and read about how dumb I was when I started, so I hopefully keep some sympathy for those who are just starting, some humility, and some mile-markers for the progress I’ll have made by that point.  Maybe this will help others, too, going through a similar path, or help someone going through an entirely different awakening or change, who somehow sees some parallel.  Mostly, though, I want to be able to remind myself, when I’m panicking, that I’ve actually accomplished a lot, and bolster my confidence again (however temporarily).

I also (accidentally) read an post encouraging people to write more, as a way to not only contribute toward the sum of knowledge out there, but to increase general curiosity, amplify focus on the world, and just overall pay more attention. Here’s  that post, if you feel like being galvanized toward committing pen to paper or keys to sensors.

So, here goes!

Two weeks ago I started learning Python (among other things) in the company of a group of women under the auspices of Hackbright Academy.  This is both a complete right turn from where I’d been before and also feels like a return to a path I should have been on the whole time.  I love logic, puzzles, and languages. What was I THINKING waiting so long to get into this?

I’m actually not entirely sure how to answer my own question.  It may just have been the conviction that a 25 year old girl with no CS classes in her history has no chance of learning enough to make a contribution as a developer.  I want to smack 25 year old me for such thinking.

So now I’m two weeks into the program, and I’ve learned so much, it’s already hard to think back before I knew what a for-loop was (I kept thinking people were saying “four-loop”) or the difference between the 1st element in a list and the element at index 1.  I know that, as with any learning experience, I’ve picking the low-hanging fruit. I know that each successive lesson will most likely be harder, more abstract, more complicated, than the one before it.  Such is the nature of learning, though, so I vow to try not to get discouraged when subsequent successes are fewer and farther between.

I will not fall into the pit of dispair that yawns beneath my feet whenever something is not easy to understand, conceptually, and cannot be instantly implemented.  Well, I will try not to.

This past week, one of our challenges for class was to create a Markov text generator; taking a sample text by some person (Dr Seuss, Jane Austen, JK Rowling) and creating psuedo-text in the style of their writing.  We created a dictionary mapping n-grams (bi-grams, in this case- chunklets consisting of all the two-word combinations used in the sample text) to all the potential next-word options in that book.

I can’t even tell you how fun this was for me.  Frustrating, at times, when I say what I needed, in English, but couldn’t figure out how to make it happen in Python… but ultimately, so satisfying to complete a function and have it work as expected.  Gratifying to pass the completed program a chunk of Dr Seuss writing and to have the generated sentence yield “I do not like green eggs and ham.”  It was most thrilling, though, to feel like I’d made something. From scratch.  What a heady feeling that was!

Then writing a script to connect to twitter and tweeting the generated text to all my millions (tens, really) of followers… that felt real.  Like something I could be asked to do in the future. I tweeted more in that day than in any other day ever, I think. Not that that’s saying much.

I know that, when I’m in the workplace again, I almost certainly will not be asked to create a Markov text generator again.  I know there will be aspects of coding that I’m not thrilled about, and tasks that aren’t so fundamentally exciting.  But I am so glad to be learning about all the things I can do in Python, and I hope I’ll always have more puzzles to solve to keep me excited.

Maybe knowing that these words are live on the open information network will keep me honest, keep me feeling accountable for the site in general, and for reflecting and contributing content regularly, too.  I hope so.

Here goes.

Posted in Personal Journey, Python Development | 1 Comment