Tuesday, December 9, 2014

Caching & Naming: the Hardest Things About Programming?

I recently heard someone say: "The two hardest things about software engineering are caching & naming."

I've not learned much about caching, but am about to. The app I am working on was at one time running slow, so the agency decided it would be a good thing to implement caching for user images & data. They did a little overkill though, and have implemented several layers of it so it is affecting user experience. Plus, my company is spending too much on these services.

So, in order to help optimize the app and its caching, I'm reading this article and this article to start learning as much as I can about caching. If you can recommend any others, please do!

The naming thing I'm pretty comfortable with. If these two things are the hardest thing about software engineering, I got this.

I like this idea from a commenter on Steve Souder's blog, Cache is King:
"If you are combining all your JS into a single concat file, you are undoubtedly combining some code which is extremely stable (like a jQuery release which will never ever change) and some (maybe a lot) which is quite volatile (like your UX code you tweak frequently). If you only serve one file, you have to pick one caching length for all that code.  
If you split your JS into 2 chunks (the volatile chunk and the stable chunk), you can serve each with different caching length headers. When your UX code updates frequently, over time, repeat users on your site will not have to keep downloading all that stable code over and over again.  
I have done these things in production on large sites and I can attest time and again it helps. It helps big time. And it’s nice to see your real numbers research backing that up."

Wednesday, November 5, 2014

How We See Ourselves as Developers

It's common knowledge--among the female developer community, anyway--that women often under-represent their skills. Women say they can do what they've done before, where men say they can do whatever they think they can do, whether they've actually done it or not. It's kind of a confidence thing.

So, I've been calling myself a "Junior Developer", which is what I feel like most of the time. I feel like I'm being honest: I know I know a LOT--more than a TON of developers I have seen get hired. But I don't have consistent experience in a long term intense production environment--this is what I feel makes me junior.

Today I received this feedback (via a staffing agency) from a technical screener who is a 20-year veteran. It was just the confidence boost I need. Furthermore, he rated me between a 7 & 9 out of 10 in FED skills.  
"Mary has an extremely evolved and intuitive grasp on javascript and the front end. She certainly has a talent for merging graphical design with data delivery. Her skill set seems to have started from more of a design discipline, but in our conversations she demonstrated a strong understanding of how different architectural components would fit together. She answered strongly technical css questions as well and showed confidence with html. I would have no problem saying she is very technically competent. 
She certainly has the ability to perform well as a Mid to Senior front end developer on a team with several others or a strong lead, as she could use more experience with different frameworks/architectures, workflows, and some confidence building. 
She certainly seems to have a strong skill set topped off with terrific communication skills. I would highly recommend her for a position which will really allow her to grow quickly."
It kinda blew me away, and it has made me realize how I do downplay my skills--but I'm not sure why I do. I don't know if I'm trying to be humble, or manage expectations or what, but I need to knock it off.

Sometimes it's just good to gain some perspective on where you're at from someone who has no agenda other than completing the task of giving an honest and accurate appraisal of someone's skills. He gets paid whether it's positive or negative, and he's got a reputation to maintain. 

Monday, October 13, 2014

gRaphael Line Chart With Grid & Popup Tags

I've been learning a few different data viz applications and am learning a bit about what they are each capable of.

Here is an example of a line chart I had to build in Raphael, using the gRaphael library. Why Raphael?

  • It's fairly light weight & makes it easier to render SVG objects without drawing them by hand. 
  • It is backward compatible to IE 8. The company I'm working for has clients that are slow to update to the most current browsers, so backwards compatibility is required. 
Some drawbacks: 
  • It is really poorly documented. 
  • You can not control the style of the axes or placement of the labels. The labels in my example are simply divs that are placed using css. 
  • You can not easily do grids. This is kind of a joke. The grid in my chart is actually a table inside a div that has the borders turned on. There are several divs in this chart, and they are stacked on the z-index to create a hierarchy. The white square is at -10, the grid is at 0, and the line chart itself is at 10. 
You may be wondering why I did not do a set with the white graphic and the line chart -- or simply make the background of the chart white. The problem is the grid. As I mention above, I had to try to sandwich the grid between the line chart and the background. For some reason, the z-index settings seem to not be working and I need to try to get it to sit just behind the orange line. They block access to the tags. 

The popup tags are set by x & y coordinates, but are populated with yet a third data set. 

I'll post an updated solution later. In the meantime, I'm going to look for a libraary that does exactly what we need it to so we don't have to do all the klugy workarounds. 


Wednesday, October 1, 2014

JavaScript Frameworks


Some Javascript frameworks I've been using lately:

Backbone.js: A front end framework for single page applications in an MVC framework.

d3.js: A Javascript framework specifically for graphic data representation. Utilizes SVG, but is much more rich and complex as far as data integration than raphaël.js.

Some good d3 tutorials:


raphaël.js: a light weight library for creating simple vector graphics. Better for backwards browser compatibility than d3.js. The axes are not easily configurable and one of the complaints many have about it is how poorly it is documented.

Here are some blog posts I found about it:



three.js: A Javascript framework for 3d graphics.

tween.js: A javascript tool to do tweening in animations. 

node.js: A javascript framework to create an environment for multi-core applications.





Wednesday, March 19, 2014

More Notes on Erlang

So, I have been talking about Erlang a lot. It just seems to work so well  with my thought process. And for crying out loud: the syntax is so similar to written language! Clauses? Periods at the end of statements? Semiclons? How can you not love that?

Yes, it is not useful for processing huge amounts of data and crunching numbers. What it is good for, however, is allowing a lot of connections to the application without crashing. This is why Whatsapp was able to have ~500 million users and a staff of only, what was it? Thirty-two?

Since it is multi-core, it is actually faster than node.js. Not as fast as c, but it is often compared to node. So I will just tell you: Erlang is faster. I think the only reason node.js is popular is because there are more people who already know javascript, so what is one more framework? It is easy to implement and learn node if you already know javascript.

So, here's the deal. Erlang is really good at pattern matching and sending messages, and allowing a huge number of connections to the application. Hm...what can that possibly be used for? What is it that people are now talking about? I'll give you one hint: "Refrigerator".

Ping me in the comments if you want to talk about it.


Monday, March 17, 2014

A week full of snafus...technological and otherwise.

During my interview process, I sometimes wonder if anyone ever really looks at my blog to see what I am up to.

I've had interviewers tell me they did look, which I really appreciate! However, if you are one of the one or two people who do possibly look at this blog, you may have noticed that it -- and my github account have both been very quiet over the last week or so.

I've had a week or so of my attention occupied with first a family emergency, then the untimely death of my hard drive, and the loss of everything I was currently working on, as well as the configuration of my system. Lessons learned: 1) not only should I back up, but I should back up often. 2) Next time, I am going with solid state.

On the upside, I now know how to change out the hard drive on my mac. I was able to upgrade it (with some help) to one terabyte and it runs like new!

Today, I have been getting my system all reconfigured, resetting passwords, downloading software and retrieving licenses...

Tomorrow I should be able to get to work!








Friday, February 28, 2014

Some notes on Erlang

I'm following this tutorial. Does anyone know of any that are better?

First note: There are no strings in Erlang. WHAT?? That's right. There are no strings. They can be processed, but since Erlang started as a language used in telecom, it is not the best language to process strings.

Joe Armstrong, the inventor of Erlang, gives a presentation here. It is looking like Erlang is used to build a program for concurrency and speed by parallelizing and utilizing more of the cores as hardware gets faster and faster.

I love this analogy: Joe Armstrong shares this analogy about programming languages. C is car that is easy to drive, but it breaks down occasionally. Java is like a family station wagon -- it's a little heavy. Erlang is like a fleet of little cars that work together to take you where you want to go.

How can you not love a powerful data retrieval tool like this? I'm liking the pattern matching.

 91> Weather = [{toronto, rain}, {montreal, storms}, {london, fog}, {paris, sun}, {boston, fog}, {vancouver, snow}]. 
[{toronto,rain},
 {montreal,storms},
 {london,fog},
 {paris,sun},
 {boston,fog},
 {vancouver,snow}]
92> 
92> FoggyPLace = [X || {X, fog} <- Weather]. 
[london,boston]
93> 

93> 

Check out my first program here!

Some Tools

More later.

Wednesday, February 19, 2014

I'm Getting Started with Angular Templates and Routes.

It looks like Angular is the latest of the javascript technologies to use on the rails stack to create single page applications. Here is some really, really simple code in my github repo.

Tuesday, January 28, 2014

MongoDB & Node.js

I've been exploring both Mongo DB recently, and Node.js. I keep hearing about how they are "hot" right now -- along with others, like angular.js.  As many of us know, though, using a technology just because everyone's talking about it is not justification for why we should use it. Each technology offers inherent functionality and benefits. It should be used because the application -- or the development team -- would perform better using that technology.

Can you justify the use of a particular technology in your project or are you using it just because it is "hot" and everyone is talking about it?

So, whenever I hear that a company is seeking a developer with skills in these two technologies, I am compelled to ask, "Why are you using this technology?" to better understand what it's about and why people are using it. I also ask it to see if this is a team I want to work with. If they don't have a good answer, chances are their projects are not well planned and designed. I am investigating the benefits and applications of each of these to better understand why I might use them in the future.

I was at She's Geeky last week and had some good conversations about both databases and identity (but that's another blog post). Sarah Mei led a session asking about MongoDB and its uses. Our group came to the conclusion that it is good for obviously, "unstructured" databases. But when do you need an unstructured database? are you trying to use an unstructured database, when really your data would perfectly fit into a tabular format?

The really valid uses for it seemed to be when 1) when you have a lot of user generated content, and 2) When the structure of your data may change often and be somewhat ephemeral. I've noticed that it seems to be used on a lot of music and media-related apps, in which both 1 and 2 could apply. I will elaborate on this later.

As far as Node.js goes, I am learning that it is great for uploading documents, generating reports, and generally performing non-blocking or asynchronous processes -- processes that may take some time, but you want to continue while allowing the user to perform another task concurrently.

In the next few days, I'm going to do some tutorials and get an example or two up. In the mean time, please tell me: How have you used node or MongoDB in your application. Why did you use it?

Friday, January 10, 2014

Getting started with phonegap on Mac OS X Mavericks

After fiddling around in the command line for hours, messing around with ant, cordova and android installations and configurations, I decided -- on the recommendation of a classmate -- just suck it up and install Eclipse. I feel like I'm really using my developer skills more by working in the command line, but sometimes you just have to do what will give you the most quality product in the shortest amount of time. 

Eclipse is an IDE that is specifically for mobile development and includes emulators and so on. It also includes a bunch of tutorials to help you get started. I thought it would be a huge hassle to use because the last I knew, there was only a windows version. Apparently, there is now an OS X version too. It was a huge download, but after my install was complete, I had the first one up and running within minutes. Woo! 

Here are some other resources you may need or find helpful: 

Phonegap Docs. The docs include tutorials. 

A pretty decent tutorial that is up to date. I found a lot of them are old and outdated. 

Adobe Phonegap Build. This is helpful to do several different platform builds remotely off your github repo. Keep in mind though, that if you want to try to do an iOS build, you have to pay $99 for the iOS developer key in order for that build to work. Phonegap is really used more for mobile development other than iOS, so if you're doing iOS, you might want to just stick with xcode. 

I Hope this was helpful! Let me know in the comments! 

Newbie Coders: Surround Yourself with Supportive, Encouraging People.

I'm a little hesitant to post this -- it feels a little too revealing, but I think that upon meeting me, people sometimes don't see the entire picture.

I was total nerd as a kid. A the age of eight, I had 3 aquariums, pored over a two-and-a-half-inch thick book about tropical fish around the world. I knew more than one eight-year-old should know about tropical fish. Some little girls want to be nurses when they grow up, or ballerinas at that age. I wanted to be an ichthyologist. I did not know at the time that it would require an extensive college education, which my family could neither afford nor be supportive of. I dropped that idea when I realized it would not be possible -- or so I was told.

Then there was reading, which was an escape for me. I read the typical kids books at the time: Charlotte's Web, Little House on the Prairie, and the like. For some reason, that grew into a fascination with Agatha Christie and Stephen King's stories, then on to Tom Robbins as a young adult -- along with books by various Jungian Scholars, Bruce Chatwin and Alain de Botton. Aside from work, reading and painting in my twenties took precedence over everything else. I would turn down invitations from guys who I really liked because I preferred to finish the book I was reading or the painting I was working on. It wasn't that I didn't like them. I just had my priorities. I didn't realize that "I'm doing something else tonight" was code for "I'm not interested." Whoops.

As a child, I was also immensely creative -- my handmade holiday cards for my family were hand-drawn versions of holiday-themed advertisements. I made up my own little characters that I used to draw all over everything. I crocheted, drew, painted, made little sculptures out of clay and won awards in competitions for my creations. I even had a book of "experiments" for kids that could be done using household products like baking soda. I was all over that. This eventually led to getting A's in my art, science and English classes in high school.

I've always been a bit of a renaissance girl. My undergraduate degree in Computers in Fine Art, where code was the medium we used to make art and social commentary, was the perfect combination of art, literature and science to me. I am still a renaissance girl. Some things change with time. This has not.

It was as an adult that I realized I had to force myself to be social. That it was a good thing...a "healthy" thing to reach out to people, to make connections, to have a support network. To not care too much about being judged -- everyone judges others, by the way -- whether they admit it or not. It's just human nature. I became very good at being social and communicative. Too good at it. Working with people has become one the most challenging, yet rewarding and natural things I can do. Human connection is a powerful thing, and I predict that in the next year or so, people will be talking about more in a business context. I have just had to learn to be more discerning about who I choose as friends.

I meet a lot of people. Potentially allies. But how do I decide who are just "people I know" or "friends" -- "allies"?  Allies are supportive -- what does that mean to you? To me, allies do not discourage you. Friends do not tell you that "you're not cut out for this" when you have been working as diligently as you can to learn something that you really want to learn. Instead they encourage you to believe in yourself and your ability when you're not feeling confident, but guide you in the right direction when you are headed off track. They make time for you. They show up. They do what they say they will. They are advocates for you. Friends do not give you all of the answers, but they don't let you sink or swim either. Allies do not take advantage of you by asking you to do free work. Friends stick around when things get tough for you, and you need to lean on them.

I give all this background because I want to emphasize the importance that if you are passionate about learning to code, don't let the naysayers stop you. It doesn't matter what your background is. Coding is not some sort of inherent "gift" for most people. It -- just like drawing -- is merely a learned skills.  There are people working as professional developers who are more literary people -- and have degrees in things like journalism and philosophy. Don't let someone tell you -- You're not technical enough". If they do, ask them, "What do you mean by that?" Since they are obviously not seeing some sort of quality about you that they believe is a requirement. As my bootcamp instructor said about those who say things like "You're not technical enough.": Those people are assholes. Steer clear of them, and don't listen to them, and ask yourself if these are the type of people you really want to consider "friends" or "allies", especially if they don't know the whole story about what your talents and interests really are?