Front-End Interview Questions – Part 2

This post is part of a series I’m writing where I attempt to answer, to the best of my ability, a set of Front-End developer questions. I expect/hope my readers will disagree, augment, and generally hash out my answers in the comments below.

What did you learn yesterday/this week?
Not that it is terribly important per se, but I learned that in some browsers, you can drag and drop a file onto an input/file field. I thought that was cool. It also got me thinking about what other browser features I may be missing out on. I tend to focus on what the browser supports in terms of HTML/JS/CSS, but in regards to UX like this (that’s how I’d classify it), I wonder how much stuff I’m missing (and how much “casual” users are aware of).

What excites or interests you about coding?
Mainly figuring things out – although a lot of times it is simply seeing my input converted into actions on the computer. That sounds lame, or, well, what all programming does, but it is honest as well. I remember my first experience with coding and the joy I felt when I actually got the computer (Apple 2e FTW!) to do what I wanted. That joy was like a drug I’ve not been able to shake off since then.

I’d say I get more excitement though from sharing with others. That’s why I write on this blog and do presentations.

What is a recent technical challenge you experienced and how did you solve it?
I wish it were more exciting, but, I’m dealing with moving a large Mongo database from my local machine to a remote server. I had to learn how to make backups and how to restore. I also had to deal with timeout issues. How did I solve it? I Googled. But in order to be sure I could get to the answers easier next time, I stored the command line calls in Evernote. I tend to have pretty crappy memory, especially with CLIs, so I use Evernote as a reference for things like this.

What UI, Security, Performance, SEO, Maintainability or Technology considerations do you make while building a web application or site?
Ah, a big one. :) Let me try to break this down a bit.

In terms of UI, as I’m mostly doing small POCs (proof of concepts), I try to keep things as simple as possible. If I need things to look nice quickly, I’ll use Bootstrap. If I’m building something in Cordova and it will be a medium to large demo, I’ll use Ionic.

In terms of security, it really depends. Almost all of my work is client-side so now, and I know that you can’t trust anything from the client when speaking to a server. So I know, for example, that if I’ve built a mobile app that stores data on the server, I have to employ authentication/authorization rules on the client and on the server, and I damn well better get it right on the server. One of the things I do when playing with a cool front end web app is open up the dev tools and look at the network requests being made. I’ll then – sometimes – open up those requests in other tabs and see how well things are locked down. I’ll combine this with curl in the terminal if I really feel like testing out an API.

In terms of performance, guess what – it depends. :) I’ll be honest and say that performance of client-side code is not something I’ve got into deep yet. I’m certainly aware of the tools browser vendors provide in this area and I know where to begin if I’m seeing “jank” in my front-end code. Maybe I’m biased, but this is exactly the kind of answer I’d hope from someone about this. I.e., “I don’t know, but I know the tools exist, where to find it, and how to start Googling to dig deeper.”

SEO – nope – I don’t care. :) Ok, I guess I do care, but, it isn’t something I think about. (Maybe I need to more. There is a SEO plugin for WordPress that a friend recommended to me.)

Maintainability – I suppose this falls into basic things I’ve been aware of since I started my career. Proper documentation, clean code, source control to help keep track of what’s changed, using a bug tracker to help manage requests versus email, etc. I’m not sure how well this is taught now. I don’t remember it being taught back when I was in comp sci, but that was decades ago. I think I just found something to blog deeper about later on.

Technology – This part of the question is a bit open ended. At the end of the day, whether I use ColdFusion or Node or – heck – Perl CGI – I want to ensure my technology stack performs well, can be secured, and is generally stable. I’d think most of the common stacks out there match that criteria so it comes down to what is best for the team developing the project. On the client-side, the biggest thing that comes to mind here is progressive enhancement. Given technology X that may only be supported on 10% of browsers, you can add it to your project in such a way that the other 90% are not impacted by the lack of said technology.

ColdFusion Builder 3 Updated (the right way)

About two weeks ago I blogged about how Adobe had updated ColdFusion Builder but had – oddly – not used the regular Eclipse update mechnism to distribute the update. Instead the expectation was that users should redownload the entire product again.

While I was happy as heck to see installers updated (that makes your post-installation experience a bit nicer imo), I couldn’t understand why they didn’t release an updater.

Well I’m happy to say Adobe released the update the right way. You can now update your Builder directly in the editor itself. To be honest, none of the bug fixes were things that impacted me, but you should check the blog post to see if they impact you.

On the off chance you may not know how to check for updates in Eclipse (come on, Eclipse is simple, right?), just go to the Help menu and select Check for Updates.

ColdFusion Bloggers migrated to Node.js

Yes, I did it again. If Adobe ever kills ColdFusion you can blame me. ;) This is just an FYI to let folks know I’ve rewritten ColdFusion Bloggers as a Node.js site running on the AppFog platform. To be clear, no, I’m not trying to kill ColdFusion! I’m migrated off my old ColdFusion server and setting up my old sites in a simpler form because – well – I want my life to be simpler. My only real “server” will be this blog, and as I’m still adjusting the settings a bit and tuning WordPress, I want every other thing I run to be as simple and low-maintenance as possible. Plus – I also kinda want to get better at Node.js!

Continue reading


Front-End Interview Questions

A few days ago, either someone tweeted or someone shared with me an interesting document: Front-end Developer Interview Questions. This document (well, Git repo really) is a large set of questions that could be appropriate for interviewing someone for the role of a front-end developer. While this was new to me, apparently this document started way back in 2009 (did we even have browsers then?) and has had contributions from quite a few people.

Continue reading

Drag and Drop on File Inputs in HTML

A big thank you to Sara Soueidan for sharing this on Twitter. I’ve worked with a few web apps that allow for drag and drop file uploads and when it works well, it is really handy. In fact, being able to drag and drop an image onto my WordPress editor is one of the things I’m most happy about since my migration. But did you know that you can drag and drop a file onto a regular HTML input file field?

Continue reading

PhoneGap/Cordova Tip: Working with files under www and Android

This is a topic that has come up a few times in comments recently but I wanted to post something a bit more explicit. First and foremost, you cannot use the File system APIs to work with files under the www folder. The docs for the File plugin incorrectly states that you have Read access to the application directory (which would contain www) but that is incorrect.

You can use XHR to read in files from under www. For text files this is rather trivial. For binary data you want to be careful before reading in large amounts of data. Remember that you can work with binary data via Ajax using XHR2 (spec and support levels).

Finally – one problem you may run into is supporting a dynamic list of files. Since you can’t read the directory, if you want to support a random set of assets under www then you would need to ship a file that contains a list of those resources. You would then do an XHR to that file, get the list, and process as you see it.

Alt-History on TV – The Man in the High Castle

As readers know, I am a huge fan of alt-history. It has been a while since we’ve had any on TV (earlier seasons of Fringe), but I was stoked to discover this week that Amazon Prime has created a new adaptation of Philip K Dick’s famous story, “The Man in the High Castle.” While one of the more common alt-history types (Nazi Germany wins WWII), the story is quite fascinating and well worth a read. If you have Amazon Prime, you can watch the premier now.

Continue reading

New Year, New Job

I’ve been leaving hints the last few weeks that this was coming, but today I can finally share with all of you. When January ends I will be leaving Adobe. I joined Adobe a few years back as an evangelist, something that had been a dream of mine for nearly a decade. I joined a team of really smart and talented people. I had no problem considering myself the worst person there. That wasn’t a slight on me at all but merely how damn good the team was. I joined Adobe at an interesting time. Not long after they begun a serious push into web standards. I saw some amazing tools get created (Brackets, Edge Animate, Inspect) and something I never thought I’d see – folks mentioning Adobe at web conferences. Sure it may have been, “Can you believe *Adobe* is doing this?” but that was perfectly fine with me.
Continue reading

Know WordPress? Need some advice.

Ok, time to throw in the towel and ask for help. ;) After upgrading the virtual server this blog runs on to a better level of hardware (1.7 gigs of RAM versus 0.6), my uptime improved quite a bit. But I still get – a few times a week – the infamous “Error Establishing Database Connection” issue. I’ve got a monitor set up for it now so I can reboot quickly, but last night it happened about an hour and a half after I went to bed so it was down for hours.

I’ve Googled quite a bit but most of what I’ve found focuses on the issue happening immediately and focus on your authentication values for MySQL. Obviously that isn’t the problem. Other items I found focus on using caching plugins to help with performance. I’m using WP Super Cache so I’ve already done that.

So – any ideas? All I can think of is to try to find out if MySQL isn’t using as much RAM as it can. Maybe there is a setting where I can tweak that higher.