Mary Dickson Diaz

Code, Life, Learning

Tag: look i made a thing (page 1 of 2)

build something with socrata’s api — check

weed violations screenshotTop of my to-do list has been to build something using data from the City of Seattle data portal (data.seattle.gov), powered by Socrata. This one is not particularly useful, but I’ll share with you anyway!

One of the things I like least about homeownership is the need to keep up a yard. Thankfully I’ve never received nastygrams about yard care, but I’ve heard some horror stories. One couple in Texas was in the process of removing a dead tree from their yard — they had just cut it down and into transportable sized pieces, and piled and covered the logs up with a tarp, and THE NEXT DAY they got a note demanding they remove “tree debris” from their yard within three days or pay a penalty.

Anyway, in that frame of mind I giggled through the “weed and vegetation code citations” available via public record. Since Washington legalized marijuana last year, I had an idea in my mind to track code citations like these:

  • Large overgrown blackberries and vegetation encroaching sidewalk
  • Hazardous vegetation encroaching on sidewalk forcing pedestrians into street
  • OBSERVED LARGE TREE ON PROPERTY NO SIGNS OF RODENTS AND NO BEES WERE PRESENT DURING A SUNNY DAY

…and present them as our city’s most pressing weed violations.

Clever? Maybe. Half-baked? Definitely. My first idea was to tweet out the description of the citation, with a google maps street-view image of the address in question. That might be visually interesting but seemed like a huge invasion of privacy, so I quickly shelved it. I have no interest in actually shaming the property owners.

So instead I started with the easiest path, tweet the generic descriptions, to see where that led me. Here are the “get-started” steps:

  1. Register for a developer key with Socrata
  2. Identify the data set you want at data.seattle.gov (for me: code violations)
  3. Use developer key to access the API (I used a Ruby gem from Socrata) to fetch that data set
  4. Filter (for code group: “weed and vegetation”) and collect results in an array
  5. Set up a Twitter API client to talk to twitter, via a new twitter account if needed (I recycled an existing bot!)

Continue reading

where i’m from

where i'm from screenshot

I finished the first part of my #NaNoGenMo project, a “Where I’m From” poem generator.

click meeee for poetreeee

It’s nothing fancy, but I’m really pleased with how it turned out.

Some technical notes:

Continue reading

diving into the oh heck

This is a process post. Or, how I think through possible courses of action when I hit a roadblock.

Screen Shot 2015-08-16 at 8.41.12 PM

I’ve been making my way through Ruby the Hard Way bit by bit and I had a lot of fun this weekend with exercise 45, “you make a game.” This book and the Python version are both great learning tools for the language, and now that I’m getting to the end I see it’s a great tool for learning the basics of web deployment as well. *More than once* I have gone off on a side tangent and scoured the internet for a solution to my problem, only to be redirected back to the book and find that it addresses my question several exercises later.

I like my game, a simple text adventure based on Adrienne Rich’s poem ‘Diving into the Wreck,’ so much that I want to share it on the web with you, and that kicked off the latest rabbit hole. I still haven’t found a solution to this, so if any of you out there know enough to help me out, I would greatly appreciate it!

Here’s where I’m at:

Continue reading

building the #notbot

It started with Peter and the Wolf.

Wolves

I’ve been wanting to play with Markoved text for some time, using books available in the public domain, easily accessible via Gutenberg. The idea in my head was to create a Twitter bot that would mash Peter Pan together with Call of the Wild (although later I realized that Beowulf would be the better option) and tweet lines from the merged books. As I dug into this project, I realized that the mash-up text wasn’t really interesting enough to hold its own as a bot, but I did like combining different texts to see the results. After while I realized that the *more interesting* challenge would be to build an app where any two (or more) Gutenberg texts can be combined. Behold, the #notbot! Screen Shot 2015-08-15 at 7.55.06 PM

(And yes, I got my Peter and the Wolf in there.) Go play, and then come back and I will show you how I built it:

Continue reading

rails for robots

Look, I made a thing!

Screen Shot 2015-07-17 at 4.45.53 PM

I took a giant leap this week in my knowledge base, learning and launching my first Rails application. It tracks robots that you would like to build. If you don’t build robots, it has no real practical purpose other than meeting the objectives of the assignment.

For those who don’t know, Rails is… how to describe this. It’s frequently paired with Ruby and it’s a thing you stick your Ruby code into to make it a lot more complicated. Kinda. I still don’t really see the point. It connects your code to a database so you and other people can store things. In theory you could design and run a weblog from a Ruby on Rails app instead of using, say, WordPress (hey that’s not a bad idea). (Except that any entry would probably take 50 hours and like 17 file updates.)

Suffice it to say, I have a lot to learn still about Rails.

But my app works! Go add a robot! This completes the three application assignments, so I’ll tinker this weekend and submit on Monday. I am hoping to gain official acceptance before August 10th, which is the scholarship application deadline.

Some thoughts on Rails:

Continue reading

two down, one to go

20150624_175232

View from the plane over Greenland.

Now I remember.

After I spent an intense month learning about html/css/javascript/jquery the plan was to keep working on www.marythought.com so I’d have an opportunity to keep practicing with it. Remember that? The plan? The plan to look out for Future Mary?

Right, so, that didn’t happen, and consequentially I spent a lot of time this weekend re-learning (googling) how to do stuff with jquery. But readers, *I MADE A THING.*

I made two things for you, actually.

First, my very favorite thing: books! I made you a library in Ruby. It needs a bunch of work still, but if you know what you’re doing, you can add books to your library and put them on shelves by genre (or whatever). Given more time and resources I would go ALL OUT with this assignment (alphabetizing is my favorite meditation technique), but I am trying to keep it simple. If I have more time before it needs to get submitted, I’ll add authors and ID #s to the books to increase sorting abilities and functionality. I’ll also add a “librarian” function to walk you through all the stuff you can do in the library. What’s holding me back from the latter is figuring out how to generate and keep track of new Class instances within a function when I need it to be able to do stuff before knowing what the instance variables are going to be. Clear as mud?

And second, I dredged up enough knowledge about html/css/javascript/jquery (why hasn’t anyone come up with a catchy nickname for this language crew yet. HCJJ?) to make a simple to-do list. Here you can go play with it if you’d like: simple html to-do list. It is certainly the worst to-do list I’ve ever encountered, and has all sorts of usability issues, but it does meet the stated criteria and I think it’s probably best to keep expectations low in this category. Lower. Lower. There you go.

The last mini-project I’m working on is a Rails application. I’ve yet to tackle the Rails part of Ruby on Rails, so this will be an adventure. Last week I got everything installed, so I’ll probably re-start my Treehouse subscription for a tutorial this week, and focus on getting that done and tweaking everything else.

Stuff is starting to come together in exciting ways.

Some links! Not code related, sorry!

  • #blacklivesmatter protestors go to Chicago and film the Mike Brown gallery exhibit. Must watch. Curious what my legit artsy friends think about this (what you will probably say is there are bad galleries and bad artists and this is both, and then some).
  • “F*ck that,” a guided meditation for our times. <–you need this. I need this. The world needs this.
  • I’m generally wary of “I did TFA and it sucked so TFA sucks” stories, so I wasn’t putting much stock in “Teach For America: Counter-Narratives” until the organization went and published a “response” to the alumni authors of the book before the dang thing has even been published. So now of course I want to buy 10 copies. Their response, which I will not link to, says “In particular, a small group of former corps members involved in the book have chosen to focus on past experiences that are not in line with how we operate. … It’s not productive to address in this space every critique in this book, but here’s what we have to say about some of the contributors’ bigger misconceptions.” I repeat: the book. is not. out. yet. They have not been provided an advance copy. (UPDATE: on July 27 TFA clarified that they received a copy from the publisher on July 8. Why they couldn’t just say that when first questioned…) The editor of the book doesn’t even have his copy yet. Just more PR spin and refusal to listen (read) from an org whose #1 critical feedback from alumni is that they are too focused on PR and they don’t listen.
  • Uhhh… I am probably hella guilty of this, but I’m trying (from xkcd). 

state of the code

this kid has A Plan

this kid has A Plan

(cross-posted with The Plan)

In January 2015, I made a tentative 4 month schedule for what my code learning would look like, and for the most part I executed on it. Anything optional got shelved. Almost all the MOOCs got shelved (I did stick with the MIT one about 3/4ths of the way through). I went to one meet-up group meeting, once, which is ridiculous given the wealth of resources in our community and openness to sharing, but hey, this journey is about learning and I’ve learned I’m not a meet-up person.

Not surprisingly, in-person class commitments were key to moving forward and keeping me accountable, and I’ve had overall positive results with Code Fellows so far.

If I had to plan it again, here’s my do-over itinerary:

  1. First, get you a Mac, or get ready for a world of pain.
  2. Unless you’re planning to do the full-time bootcamp (in which case do everything you can the month before), take a night class with Code Fellows ($500 for foundations I or $1,500 for foundations II if you already have some code experience and want to prep for an accelerator).
  3. If you have an opportunity to apply to Ada Academy, do it! Don’t let the required video and their unpredictable cohort schedule scare you away, unless the latter is a deal breaker. This cohort timing wouldn’t have worked for me, but that’s not why I didn’t apply — I didn’t apply because I was scared to make a stupid video. And that’s super lame. So, you know, just do it (and then turn them down if it doesn’t feel right).The act of applying will be a useful exercise for you. This year they had 265 applicants and selected 24 women, and, while I’m confident the number of applications will only grow, those odds are not terrible. You can do it!
  4. You’ll want to work all the way through the HTML/CSS web track andJavaScript tutorials on Code Academy. These are required for the Code Fellows foundations classes and a good intro/refresher for everyone else. Don’t let it be your only teaching source, but it’s not a bad piece of the bigger pie.
  5. Work through MITx 6.00.1x  Intro to Computer Science with John Guttag. I bought the textbook but never really used it, so skip that. Instead get the textbook for…
  6. Python the Hard Way: the book is offered for free entirely online, so a paper copy is optional (but nice, IMO, because you can keep going without an internet connection). If the hard way isn’t your style, try Elizabeth Wickes python for informatics instead.
  7. Get familiar with git (where you’ll keep track of your programs), unix/terminal line(where you’ll run/edit/etc your programs) and a text editor, I use Sublime 2. Like, really, learn them. This could maybe wait until month 2 or 3 but the sooner the better.
  8. Tackle a few side projects to start to grow your portfolio and have something to practice your new skills on: mine were this blog (powered via WordPress), a non-Wordpress pure html/css webpage, and twitter bots. Bot, bot, bot!
  9. Talk to programmers to learn about their jobs, and research code school options that might be a fit for you.
  10. Hopefully you made some friends in your class (or online) and have an ongoing study group in the works. Or, for Pete’s sake, go to some meet-ups. I hear they don’t bite.
  11. You should probably try a few languages/programing paths to see what’s a fit. At some point you’ll want to narrow down a programing language. Keep in mind that once you know one, it’s easy enough to pick up another, so you’ll also want to pay attention to who’s teaching what and where the opportunities are. I personally like Python and there are lots of jobs in JavaScript, but I had a great experience with an instructor who teaches the Ruby accelerator and that’s what I’m currently focusing on.
  12. Next steps for me: take another foundations II class in June (this one in Ruby), and apply for the Ruby accelerator in August. On this path, I’ll be “done” by the end of October and looking for jobs or internships before the start of 2016. We’ll have to take a good hard look at finances after the wedding and honeymoon this summer. I’ll be most comfortable if my period of unemployment lasts no longer than a year, but I’m mentally prepared for a career shift to last up to two years (same amount of time as full-time grad school for most programs). One year could be crazy wishful thinking.

And that’s it! I tried and failed to break this out month-by-month, but I hope this is helpful to someone even without that timeline. I’ll keep my first (aspirational) draft on The Plan page that has many repeat resources (and a lot more that I didn’t get to). Enjoy! –Mary

top bot

OK, you want to talk bots? Let’s talk bots! First, let’s go back…

WAAAAAY back. A few weeks ago, I got a nice mention on Twitter from a procrastinating grad student who found my tutorial and used it to set up Ecce , a Publilius Syrus twitterbot (I had to wikipedia that).

Continue reading

house of cards

While the rest of the internet was tuning into Netflix on Saturday, I was sitting in a basement classroom learning about Unix and git. SO FUN I know. I was actually looking forward to it because I still don’t really understand about branches and forking and merging and pull requests and ahhhhh all that version control stuff. And, the 1-day course came with a substantial but manageable list of pre-work, which is something this org does well and I appreciate.

Unfortunately, we used a LOT of class time going over that pre-work and other very introductory material, such that I found myself multi-tasking (like Unix!) and finished my final project for class. Appropriately: a game of cards.

Play!

Continue reading

the toggle button that wasn’t

HEAR YE, HEAR YE: I made a thing in which I practice using jQuery and mix my literary metaphors: Rabbit, Run!

If anyone knows how to make the toggle button actually, you know, toggle… please share. Until then it *says* “toggle bunnicula” but what it actually does is “click here for bunnicula forever.”

Related, this exchange with Josh (my partner, a professional game designer):

Continue reading

Older posts

© 2017 Mary Dickson Diaz

Theme by Anders NorenUp ↑