Megan Taylor

front-end dev, volunteacher, news & data junkie, bibliophile, Flyers fan, sci-fi geek and kitteh servant

post

Three WordPress plugin ideas

Because I can’t find any that do exactly what I want…

1. A sidebar widget that shows the 5  (or whatever) most recent commits by a user to any GitHub repo. Realized my commit messages are not useful, found a plugin to show a list of repos.

2. A sidebar widget that shows the 5 (or whatever) most recent public Gists by a user Found one.

3. A sidebar widget that shows 5 (or whatever) Meetup groups a user belongs to that are either the most active or have upcoming events.

April 18, 2013 | Comments Off on Three WordPress plugin ideas | Categories: Posts | Permalink

post

“I finished Codecademy, now what?”

I really like Codecademy about 80% of the time. It’s a good way to learn the syntax and keywords and concepts of a language. But it’s buggy and once you complete a course, there are few pathways to the next level.

I see this question asked on Reddit all the time, in various programming subreddits. The responses are not always kind, and there are  a lot of vague “Build something!” responses.  But I thought it would be helpful to compile the best ideas here.

PYTHON

Enkaybee: I always recommend Project Euler because it’s free and it presents some real challenges without any guidance. You have to think logically on top of knowing syntax. You have to write efficient code for many of them. Codecademy is the training wheels, Project Euler takes them off.

RojaB: Don’t you even feel prepared to contribute to open source projects like www.whatcanidoformozilla.com? Have you done API things (dunno what those are yet) for Python at codecademey?

AluGeris: I also have recently finished codeacademy’s python track. Completed ‘Rice university’s An Introduction to Interactive Programming in Python’ with flying colors. Now I’m into CheckIO challenges. They don’t have a learning course per say, but when I complete a challenge with my weak skills I am able to view other peoples solutions, which gives me an insight on how much easier I could have done something.

FletcherHeisler: See if the practical topics in the 2nd half of my course at RealPython.com might be of interest to you – maybe a good first step toward some of the scientific applications! For crypto and game dev I definitely recommend Sweigart’s two books respectively. For mobile dev (in Python!) you might want to take a look at Kivy. Definitely focus on one, maybe two courses at a time to make sure you’re making progress instead of just distracting yourself, but start with whatever interests you most at the moment!

monoglot: A new intro to Python course is starting this week on Coursera. Focuses on simple game design. https://class.coursera.org/interactivepython-002

johnflim: I heard about this site from a friend. i only just looked at it now, and the second puzzle deals with a cipher. PythonChallenge

eriiccc: Check out udacity.com. They have a bunch of python classes. I’m currently working on building a blog site with python and google App Engine. The guy teaching the class is one of the Reddit cofounders. They also have a class that goes over algorithms taught by Peter Nordvig. Both classes have been great so far.

R3TR0: Edx.org 6.00x. Seriously.

Mtn_Wolf: I say you should go to the DailyProgrammer. Here you can try out tons of different coding challenges. Rule #1 of Coding: Practice Practice Practice. Also! Keep all your programs you make. You will notice that you pick bits and pieces from previous works to build more complicated projects. Happy Coding!

wumsdi: Where do you want to go with programming? As a general advice I’d say: Learn more about data and computer science: Take a look at courses at Udacity.com, for example; read more about python http://pythonbooks.revolunet.com/) – and practice a lot (sites like http://codingbat.com/python are good for repeating – although the python part here is a bit short). Have fun!

303me: “Head First Programming.” It uses Python as the language and introduces you to basic concepts in programming, making a GUI, using libraries, etc. NOT to be confused with “Head First Python,” which isn’t as good of a book.

Cfattie: Well, if you’re into coding games, I would suggest “Invent Your Own Computer Games With Python”. I’m not sure how much of it is overlap from Codeacademy, but I guess you could skip the stuff you don’t know. I started with Learn Python the Hard Way but I switched to this because it tells you most everything you need to know to understand the program, and then gives you the program to copy and learn from.

kgleeson: Check out http://code.google.com/edu/languages/google-python-class/ Its a pretty basic course, but it gets you to do a lot of interesting things.

Jon-Targaryen: I’d recommend that you switch right away to the latest version of Python, Python 3. You should be able to pick up on the differences very quickly (as far as usage goes, it’s mostly just minor syntax). Non-Programmer’s Tutorial for Python 3 is a good wikibook tutorial.

cheifing: As someone who is also learning python, I would recommend: http://www.learnpythonthehardway.org/ Since you already know a bit about python, you’ll go through the beginning chapters very fast, but the later ones get interesting. The author also checks the comments very often, answering any questions you may have. If that seems to advanced for you, or if it gets too hard, I would recommend this book. This book is great if python is your first language, and goes through everything in detail. It also teaches you some of the general programming lingo.

herefortheawws: I would try the flask (flaskr) or django tutorial, or another framework. That way you will actually move to putting things online, and it will gradually make more and more sense, and it will be easier to transition to making your own web apps (if that’s something you want to do). IMHO, there’s only so long coding practice is useful until you need to learn how to put it all together.

IronPhysco: The other comments suggesting that you should tackle a personal project are good, and I definitely suggest you do that as well to become more familiar with using python in practical applications. It’s difficult to find tutorials for practical code exercises outside of academia, so if you can think of some small utilities like:

  • grab a webpage from a given url and download all images
  • write an image-to-ascii program (and the corresponding ascii-to-image converter)

or possibly a game (and smart AI) such as

  • tic-tac-toe
  • connect-4
  • a program that can play battleship against you or itself (and can draw the board on the terminal)

you’ll learn a lot from analyzing the task itself, and from getting stuck on a certain function and looking up ways to improve your approach.

However, you do mention not knowing much about intermediate subjects of programming. If you wish to take a deeper approach to learning the why-does-this-work side of programming via Python, I suggest you dive through this text written by my CS professor. The Art and Craft of Programming: Python Edition. He starts from the basics and works his way up to data structures (something I don’t think was covered in your linked text) and operations on 2D arrays (matrices). You’ll learn a lot from the data structure sections, specifically why some structures are better than others in certain cases, and when you should use them.

I would also recommend looking into “Big O Notation” for more advanced theory into algorithm complexity, something which I cannot stress enough how useful an understanding of this is for writing quick and efficient code. A good summary/example for beginners can be found here: A Beginner’s Guide to Big O Notation. Using this knowledge with an understanding of different data structures can keep your future programs from stalling unnecessarily when operating on a collection of data.

JAVASCRIPT

pandu13: Try learning JQUERY. A javascript framework.

d0gsbody: The sidebar here has a pretty great list of resources, especially if you check the Mozilla link. (As you quest forward, google, stackoverflow, and mozilla dev network will become your best friends).

Start working your way through Eloquent JavaScript. When you can’t understand 3 paragraphs in a row, start googling for answers.

Get the tampermonkey (chrome) or greasemonkey (firefox) plugins for your browser. Start writing Greasemonkey scripts for your favorite webpages. Post them to userscripts.org.

Start using developer tools. Use the console in your browser. Set up a github account and start pushing your better code to it (like your greasemonkey scripts). If you’re not already using a text editor, download Sublime Text 2.

I know you said you don’t want to do a bunch text, but, just so you understand how your jQuery actually works and are equipped going forward: Go to projecteuler.net. Start solving these (this will force you to learn a lot of syntax and to thing algorithmically, which pays off in spades). Write pseudo-code solutions and then actually code them up in JavaScript. Push these to GitHub.

Be active in this community and others. Learn from collective intelligence. Post your questions!

Most importantly, just don’t stop coding. Your knowledge will snowball.

EvanHahn: I made JSTypes and Fiesta.js to learn JavaScript in depth. In order to learn Ruby on Rails, I’m currently working on a site that allows you to meet up with other Super Smash Brothers players in your area. I’ve a bunch more things I’ve made on my website, if you’re curious, and most of them were terribly educational.

IncipLTN : I hear The Definitive Guide is more of a reference book and not as good for beginners. I’d instead suggest Javascript: The Good Parts, but my first suggestion would definitely be Professional Javascript for Web Developers. Eloquent Javascript is another very good option, but it doesn’t go quite as in depth as those two books. I personally did a whole mishmash between the three and somehow came out okay, but I’d definitely suggest sticking with Professional Javascript. But really, your next step should be making something. Anything that interests you. Node.js piqued my interest, so I picked up Smashing Node and I’ve now built a decent IRC Client and I’m half way through building an IRC server.

d0gsbody: Join my study group: http://www.reddit.com/r/learnjavascript/comments/1bombd/announcing_the_how_to_learn_js_properly_study/

If you just finished Codecademy, make sure you do the Discover DevTools course in the next week (it’s linked in my study group post). It’s OK if you don’t understand the whole video, just try to burn through it and know how to open the console that codecademy never taught you about, though you used console commands quite a bit (“console.log”). The study group is going to incorporate a decent amount of jQuery.

PHP

krues8dr: Time to learn a framework or two. Picking up Symfony or Laravel will help you out dramatically from here.

April 17, 2013 | Comments Off on “I finished Codecademy, now what?” | Categories: Posts | Permalink

post

Project Idea

After dealing with movers, cable guys, couch guys, wall building guys, and every other service guy imaginable, I had an idea for a side project for you. Also, this may exist already, haven’t looked yet. But it’s a site where you plug in what the service was, how much it cost, how long it took, how happy you were, variables like that, and it spits back out how much to tip the service guys. I don’t know if data like this even exists but it would be very HANDY (get it? ;) ) Just food for thought.

h/t Ezra

post

Visualizing Farmers Markets in NYC

<Stream of Consciousness>

Problem: GrowNYC does not have an at-a-glance visualization of what farmers market are open and where they are.

Solutions: Calendar and map visualizations, to answer both “What’s open now” and “What’s open near me.”

Implementation: I’ve never worked with .ical files before, but I would imagine you could scrape the data off the GrowNYC site and run a script to format it to be added to Google Calendar or whatever. I’m more interested in the map visualization. I’ve done some work with KML and GIS before, so I know it would be possible to scrape the data off the site and build a map with different icons showing year-round, open and closed markets.

Sub-Problem: I know how to scrape a single page of data, but have no idea how to go about scraping a series of static pages.

Solution: Google that!

I would like to scrape the data into a Google Spreadsheet, this would enable a lot of versatility and less maintenance (maybe?). Then set the scraper up to run once a week or so to update the spreadsheet. Spreadsheet could easily be used as the basis for both maps and calendars of various types.

Data needed: Each market’s location, active days of the week and hours, special closed days?, location, special events occurring?.

List of markets

Each market then has a page of its own (which contains the data needed!) like so:

97th St Greenmarket

Technologies:
Probably could all be done with Python. Use Beautiful Soup for scraping? How to get scraping results into Google Spreadsheet then? Google Spreadsheets also has a scraping language, I think. Could try to figure that out.

</Stream of Consciousness>

Yes, this is actually the way I thought this through on the way to work this morning.

post

MOOC Updates

My first instinct was to include the code for each course with my weekly update, but I’ve seen a lot of comments in the forums of most of these classes requesting that we not publish answers. So I’m just gonna go over what gets covered each week and my observations on MOOCs and the differences in each course.

Computing for Data Analysis:

Dropping this for now. I know R is very useful for data analysis, but I’ve made it 3/4 through the course without really learning ANYTHING, even though I’m getting perfect scores on the quizzes and assignments. The class is just going too fast for me to grasp the concepts without devoting a lot more time than I have now. Note to self: Come back to R at some point.

Learn to Program: The Fundamentals:

This week was all about string operations: comparisons, substrings, len(), string methods, dir(str), indexing, slicing, and for loops over str. Also covered accumulators and IDLE’s debugger. Quiz was fairly easy, run things in IDLE, play with str.find. The assignment was fun and just hard enough to be interesting.

An Introduction to Interactive Programming in Python:

Really good lectures. And the RPSLS exercise was fun. But I still don’t understand modulo. Especially with negative numbers.

Introduction to Statistics:

Although the accent is sometimes hard to understand, I’m really enjoying this one. Slow enough that I can follow, interesting examples.

The Mechanical MOOC: A Gentle Introduction to Python:

Got an email containing the first week’s worth of work on Monday. This MOOC is different from the others; instead of a self-contained curriculum, they have chosen parts of existing platforms. For example, this week we needed to read some sections from How to Think Like a Computer Scientist, watch a lecture from MIT’s Introduction to Computer Science, do some exercises in Codecademy’s Python course, and work through exercises from MIT’s A Gentle Introduction to Computer Science.

Some info about the platforms:

I’ll be honest: I did the reading and watched the lectures and I did the Codecademy units, but I only looked over the other exercises. I’ve been working on learning Python for over a year, starting with Learn Python the Hard Way, and I’m taking two other Python classes, so I don’t feel the need to go through types and operators all over again this week.

October 19, 2012 | Comments Off on MOOC Updates | Categories: Posts | Permalink

post

NOTICE: RSS feed changing

I don’t know how I failed to deal with this at the appropriate time, but basically Google bought FeedBurner, I didn’t take care of business, and now I can’t access my FeedBurner account.

So I’m turning off the FeedBurner plugin, which will break everyone’s RSS subscriptions. Good news! You can resubscribe using this feed: http://www.megantaylor.org/feed/.

My apologies for the inconvenience.

October 19, 2012 | Comments Off on NOTICE: RSS feed changing | Categories: Posts | Permalink

post

Learn All the Things!

Teaching myself how to do something has always come from a desire to make, from building rudimentary websites in middle school, to building my own computers in college. Lots of trial and error, lots of searching the webs for bits and pieces of what I wanted to do.

There are advantages to this: I’m not afraid to try to make things I have no idea how to make. My Google-fu is strong. But there are disadvantages too: Almost everything I know how to do is a mish-mash-hodge-podge collection of things that I learned how to glue together in the right way.

So when I noticed the sudden surge in free online classes over the last couple of years, I jumped right on that crazy train. I took an Introduction to Databases class. I started working my way through CodeYear. Right now, in my copious free time, I’m working on five classes in 3 different programming languages:

I have another list of classes I want to take, but haven’t started yet or I don’t have time for now.

This process I’m going through, of filling in the gaps in what I know, reminds me of this story:

A philosophy professor stood before his class and had some items in front of him. When class began, wordlessly he picked up a large empty mayonnaise jar and proceeded to fill it with rocks right to the top, rocks about 2″ diameter.

He then asked the students if the jar was full? They agreed that it was.

So the professor then picked up a box of pebbles and poured them in to the jar. He shook the jar lightly. The pebbles, of course, rolled into the open areas between the rocks. The students laughed.

He asked his students again if the jar was full? They agreed that yes, it was.

The professor then picked up a box of sand and poured it into the jar. Of course, the sand filled up everything else.

“Now,” said the professor, “I want you to recognize that this is your life. The rocks are the important things – your family, your partner, your health, your children – anything that is so important to you that if it were lost, you would be nearly destroyed.

“The pebbles are the other things in life that matter, but on a smaller scale. The pebbles represent things like your job, your house, your car.

“The sand is everything else. The small stuff.

“If you put the sand or the pebbles into the jar first, there is no room for the rocks. The same goes for your life. If you spend all your energy and time on the small stuff, material things, you will never have room for the things that are truly most important.

“Pay attention to the things that are critical in your life. Play with your children. Take your partner out dancing

“There will always be time to go to work, clean the house, give a dinner party and fix the disposal. Take care of the rocks first — the things that really matter.

“Set your priorities. The rest is just pebbles and sand.”

I started out with sand. Now I have to go back and put the rocks and pebbles in. Good thing my mind isn’t a jar.

Sidenote: I haven’t been posting my notes/ideas/experiences from this recent batch of classes the way I did with Learn Python the Hard Way and the Intro to Databases course. I might (or might not) go back and write about the past few months’ worth of learning. But I will definitely be posting about these classes from here on out.

October 13, 2012 | Comments Off on Learn All the Things! | Categories: Posts | Permalink

post

Why won’t he shut the hell up?

He has food. He has water. His litter box is relatively clean. And yet, he sits there, staring at me. Squeaking.

This has been going on for months. There are spray bottles everywhere. Mornings are particularly bad. C’mon man, my alarm hasn’t even gone off for the third time yet!!

**Squeak**

Shut up. Don’t make that cute face at me. I don’t understand what you want.

Did I spoil you too much? Did I create the expectation of attention every time you make a sound? Perhaps. But the honeymoon is over, baby. Right now I need you to find a comfortable spot and sit quietly. Please.

**Squeak**

Really? This is how you repay the woman who dotes on you, who cares for your every need? Who buys expensive prescription food to cater to your delicate digestion? Such is gratitude.

From a cat.

Cashew

Cashew

August 9, 2012 | Comments Off on Why won’t he shut the hell up? | Categories: Posts | Permalink

post

Counting Tweets to Trigger an Email to Write a Blog Post

Like the old lady who swallowed a fly…

I’ve been feeling restless lately. Not enough coding getting done. Summer lull. Whatever. So when That Guy I Married said he wanted to be blogging more frequently, and had thought of a way to remind himself to do it, I perked up.

The concept: If you’re tweeting a lot during a short time period, chances are there is a blog post buried in there somewhere. So if there were a way to check the frequency of tweets in a certain time period, and trigger an alert if the frequency went over some limit, a blog post might get written.

The result: A little PHP script that can be run as a cron job. It uses the Twitter API to count how many tweets there have been since the previous date. (I would have liked to do it as number of tweets over the course of a few hours, but I couldn’t figure out how to do it without using a database to store the status ids.) Once the number of tweets has been calculated, it checks to see if that number meets the conditions for triggering an email. (In this case, 10 or more tweets since yesterday would trigger an email.) If the condition is met, That Guy I Married gets an email reminding him to write a blog post.

The code:

I’m setting up the cron job tonight, and I guess we’ll see how effective this is. As always, suggestions for improvement are appreciated.

August 1, 2012 | Comments Off on Counting Tweets to Trigger an Email to Write a Blog Post | Categories: Posts | Permalink

post

Install Adobe AIR and TweetDeck 0.38.2 in Ubuntu

Just because I keep forgetting:

Twitter’s version of TweetDeck is le suck.

Get AIR for Linux here.

Get TweetDeck 0.38.2 here.

To install AIR, make executable in permissions and run ./AdobeAIRInstaller.bin in Terminal.

To install TweetDeck, make executable and double-click.

February 28, 2012 | Comments Off on Install Adobe AIR and TweetDeck 0.38.2 in Ubuntu | Categories: Posts | Permalink