Career panel at the Brooklyn College Computer Science Department

Today I had an honor of speaking at the career panel for CS students at Brooklyn College CUNY.

My friend Suzanne invited me to participate a few weeks ago, and I immediately thought it was a great opportunity, especially since the topic of careers in tech is near and dear to my heart, and I loved being in college and wanted to see what students these days are about.

There were quite a few topics discussed today, mostly focussed on students graduating and entering the job market. A few questions were really interesting and related to today’s hot topics, so I wanted to highlight and recap them here.

Q: What is your understanding of the future or trends in the technology field? What direction is the industry heading in and where are opportunities opening up?

It would actually be funny if someone can predict the future – or we would all be rich. Coincidentally, I just re-watched an old Soviet movie really popular with kids during my childhood, it’s called “Guest from the future”. The movie was made in the early 80s, and there’s a time machine that allows people to travel in time, and in the future circa 2080’s people “flip” in flying little cabins instead of using cars, and have devices that can read anyone’s mind. But if these things will actually happen in the future, and when – nobody knows for sure.

The best thing we can do is to get solid fundamental education, stay curious, and know how to adapt quickly. Also find out who the experts are in your area of interest (be it mobile, connecting tech with physical devices, artificial intelligence, etc.) and talk to them. A great discussion with smart people is priceless, and sometimes you can even find yourself thinking about something that addresses needs of people, and seeing it used widely in the near future.

Q: How is the technology industry currently for women and/or minorities? Do you have any particular advice for women and/or minorities interested in technology?

Technology industry is a great place to be for women and minorities! I did not personally face any prejudice or discrimination either in school or my career, and actually feel that the opposite is true – tech is a very welcoming place to be right now, with lots of jobs and openings and developer bootcamp programs encouraging women to apply. Technology field is very fair and based on merit and actual work you do – so being great is the key, regardless of your background and who you are.

My advice for anyone (men or women) would be the same – do your best, learn as much as you can, excel at what you do, be professional and a good communicator, and the rest will fall into place.

Q: Please talk about graduate school. How necessary or important is it for the field?

My answer would be based on my own experience (so might not apply to everyone), and I really didn’t want to spend time in grad school, but rather get as much hands-on, real-world experience as I could. So no grad school for me. Other panelists suggested to consider grad school if you know already you want to focus on a certain area of your field, or if your employer is subsidizing your education in some way. Agreed on both counts.

Q: What skills, training, classes or experience are important for someone interested in the technology career field?

Some panelists provided very focused answers, targeted to web development with technologies at hand (HTML/CSS). I disagree. Technologies du jour may come and go, but your basic fundamental understanding of how things work, and how and why new technologies were created will serve you long term.

For example, Ruby is a very popular language to know today. There are developer schools specializing in teaching Ruby and making you into a web developer in as little as few months. It is great. But just to know Ruby, its syntax and how to create web pages, is only scratching the surface. If you really understand why Ruby was created in the first place, what MVC is and how it was implemented with Rails, what are the limitations of Ruby that are better done in other languages, you’ll go way further than majority of other self-proclaimed developers.

If you know your fundamental stack and principles, you can program anything from a spiffy web app, to a mobile app, to a tiny-sized app that you put into a watch or send to the moon… So don’t limit yourself to one technology, and stay curious and keep learning every day. Skillshare is a great place to learn new stuff, including non-tech subjects like business, project management, art, etc.

Big thanks to Suzanne, Brooklyn College CS society who organized the event, and my fellow panelists, who each offered a unique perspective and shared their experience and advice. It was a great honor!

Map Reduce with Node.js and Mongo

Working on my pet project I ran into an issue where the data coming for mongo needed to be prepped for client-side view.

Traditionally, if it was an RDBMS, we could use a “group by” query.

In Mongo, we either have to use the dev release 2.1 that includes the aggregation framework (and then make sure that mongo driver for node.js supports aggregate commands), or use recommended map-reduce approach with stable mongo release.

I tried running a “group” command with mongo 2.1.1, but something didn’t quite work. So then I went for an alternate approach – writing a map-reduce function.

My data set looks like this (hashtags with dates and counters):
{ “count” : 1, “tag” : ” #style”, “tag_date” : “6/20/2012” }
{ “count” : 1, “tag” : ” #centralpark”, “tag_date” : “6/20/2012” }
{ “count” : 1, “tag” : ” #tisch”, “tag_date” : “6/20/2012” }
{ “count” : 2, “tag” : ” #dogs”, “tag_date” : “6/20/2012” }
{ “count” : 1, “tag” : ” #familytime”, “tag_date” : “6/20/2012” }
{ “count” : 1, “tag” : ” #rhonyc”, “tag_date” : “6/20/2012” }
{ “count” : 5, “tag” : ” #believe”, “tag_date” : “6/20/2012” }
{ “count” : 1, “tag” : ” #blogher12″, “tag_date” : “6/20/2012” }
{ “count” : 1, “tag” : ” #youthinkwerekidding”, “tag_date” : “6/20/2012” }
{ “count” : 1, “tag” : ” #pokemonconquest”, “tag_date” : “6/20/2012” }

And I need it to look like this:

{tag: {date:count}, {date:count} … }

In other words, have all dates and counters aggregated for each tag.

Here’s the map-reduce functions:

And here’s how we call it from the app:

Note: ‘inline’ parameter MUST be specified

And the results returned from the DB:

{ “_id” : “#10thingsilove”, “value” : { “value” : [ { “tag_date” : “6/21/2012”, “count” : 1 }, { “tag_date” : “6/22/2012”, “count” : 11 }, { “tag_date” : “6/25/2012”, “count” : 2 } ] } }
{ “_id” : “#10worstfeelings”, “value” : { “value” : [ { “tag_date” : “6/25/2012”, “count” : 1 }, { “tag_date” : “6/26/2012”, “count” : 3 } ] } }

Great resources that helped me make this work:

Super simple file upload with node.js

Here’s a quick and dirty tutorial on how to upload files with node. I didn’t use any dependencies aside from “fs” that allows us to move the file from the temp location to where we need it to be. We’ll also use express to make it super easy.

First, add all required modules and create our server:

Now let’s render a page with a form:

And add a post method to handle uploads once the form is submitted.

First, check out log to see what you’re getting in res.files:'/', function(req, res){
console.log(JSON.stringify(req.files)); // this will let you see what you're getting in the files


And to complete this, we’ll actually need to save the uploaded file into our desired location, in my case it’s /public/images folder:

Note: in res.files object, make sure that your file name is the same name as the input field.
<input type="file" name="uploadfile" />
var temp_path = req.files.uploadfile.path;

Thanks to hacksparrow for the post on this.

Complete working example on github

Staying current in technology

My favorite tech person and mentor of all times is Mike. And when I’m not having enlightened discussions with him over lunch or in the office, I’m on his blog reading stuff that he somehow manages to churn every day (jealous of his mad writing skillz :)

Today, he writes:

In tech, we’re sort of fucked compared to say a violinist, who can be pretty sure their main tool of the trade isn’t going to change much from the day they pick it up to the day they die, so they can sink all that energy into pure, beautiful mastery. In tech, we don’t even know if our keyboards are going to look the same 5 years from now.

All us, readers of his blog know that his “violin” is a solid combo of Linux/vim/Python/Mercurial – which makes a ton of sense, and if you’re good with that stuff you are golden.

My additional thinking is that javascript, that grew from just something that your browser supports natively into de-facto standard of the coolest new technologies, from advanced client-side frameworks (prototype, jquery, and newer stuff like backbone) to databases (mongo) to server-side (node). So now, the power is in hands of javascript masters: if you know the language, you know how to build up any app, all aspects of it. I definitely has its quirks (callbacks, ubiquituos “this”), but to me they are like delicious puzzles that once solved, promise great rewards. That’s what I’m sticking to for now, and having fun with it.

Mongo meetup april: quick notes

Excellent mongo meetup again – their meetups are always informative and have good presenters, today all three were great.

1) Custom shard balancer from GameChanger
2) Mongolian – node.js driver for mongo by Marcello
3) Variety – schema analyzer for mongo by James Cropcho

I especially enjoyed Marcello’s and James’ presentations, because both of them are so passionate about what they do and defy the awesomeness of NYC tech scene today: take a NYC-made product and make it better, and open source too. I took James’ ruby class a couple of weeks ago and it was great as well, his easy and engaging manner of speaking and unusual fashion sense just draw attention – highly recommended.

Shard balancer demo was very cool as well, but seemed to solve kind of a custom problem, which wouldn’t apply to as many mongo users as the other two.

Shard balancer (python):

Hosting update: problem resolved

Well, of course it turned to be that hosting was not an issue. Someone found a hole in one of the test sites I’ve had there and sneaked in a pretty interesting script, in Chinese! I had a good laugh once I found it: chinese script injecting redirects to Russian sites, pretty darn cool, isn’t it.

So after I’ve removed all suspicious files and the script in question, everything came back to normal. Phew!

And it was a good time to tidy things up anyways, so all’s well that ends well!

In search of new hosting

I’ve been staying on the same hosting provider for years now just because it’s cheap, worked OK, and there was no real need to change it. However, big disappointment – something that I just discovered by chance: all htaccess files were hijacked and a bunch of weird redirects were added to the top and bottom of each file. The site would load fine, but you see a lot of traffic going to some shady Russian site (duh, not surprising, and I’m from Russia) before it actually loads.

So I spent the past 20-30 mins removing that junk, only to discover that shady redirects were still going on. Then I looked into the root web directory, and there I found a non-previously-existent master htaccess file with same traffic going to basooo dot ru. WTF! Not only existing files were compromised, but also a new files were inserted as well.

Moving off hostmonster ASAP. Screenshot of the shady stuff:

Learning Ruby

A couple of weeks ago I stumbled upon classes offered at General Assembly, and one of them was a 3-hour class on Ruby. So of course I had to sign up!

I don’t necessarily want to become a Ruby developer, but I’ve always wanted to at least know the basics and how it works and if it’s really as easy as they say to get up and running with a ruby/rails powered web app.

So what’s the answer? The short answer is: it is fairly easy to get the gist of it and put together a quick prototype. Gotchas: lots of things to install, and with any language, you have to know what you’re doing (things such as MVC, database schema design, version control, etc.)

Overall, it was a great experience! I loved that the class was full (30 people), close to 1/3 of them were ladies, and the instructor (James Cropcho) gave us plenty of hands-on time and was available to answer all questions (and chewed like 25 pieces of gum during the course of the class).

Will definitely be checking out more Glasses at General Assembly – highly recommended.