#RealWebApp, E2E, Part 2

The web application is called TopPerformanceNow and is built for a client who provides employee sourcing, training and developing services. You can find his page here (disclaimer: not built by me). I opted to go with Visual Studio 2013, though this app is likely the last I am going to build in VS2013. VS2015 has way better tooling and a plethora of front-end productivity improvements.

I always like to start with an Empty template and import the libraries I need via Nuget. Since this app is rather small in scope, I used Nuget to get KnockoutJS, jQuery, momentJS and pagerJS and just kept them in the Scripts folder. I kept the CSS (or in this case LESS) in the Content folder. Generally, I try to split all that stuff into its own App folder (and VS2015 does this with a wwwroot folder by default in the new project templates).

CSS/LESS Setup

I chose to go with LESS. There’s no reason, really. I use SASS at work. I know some purists will rage when I say “they’re the same”, but I really don’t see any differences in my workflow. Functions, mixins, variables, nesting… both languages have it.

I split my LESS up into several modules: _Colors, _Forms, _Icons, _Typeface, _Reset, and individual page partials which all converged on App.less. These are all pretty self-explanatory, though one thing to mention is that _Icons contains the CSS I get back from icomoon that holds the icon styles. More on that next!

Icons

Personal preference, but rather than grabbing the whole font, I like to pick and choose which icons I really need and building a font out of them. Icomoon is great for that! They have some in-house icons, but you can also import fonts from tons of other libraries including everybody’s favorite FontAwesome (which I used in this app). I highly recommend checking out Icomoon if you’re looking for icons for your app. Make sure to check what kind of license each one has though.

JavaScript

Since we started with front-end stuff, might as well finish with JavaScript. Not much to say here other than since this is a pretty small project, I went with a non-modular approach. For larger projects with many moving parts, I usually go with NodeJS and Browserify, but really in this case there was no need. I split the JS up into different files depending on which part of the app people are accessing. For example, trial users don’t need to have access to all the JS, and regular users shouldn’t have access to admin JS. Theoretically it doesn’t matter, because everything is locked down on the server anyway, but I think it’s good practice to serve as little JS as necessary.

I used Knockout with pagerJS, which I found to be much more intuitive than Sammy. I used Sammy on my first KO project ever and I recall it was a huge chore. Pager is straight up just 3 lines of code to get working and all the routes are automatically wired up via bindings in the HTML. It’s magic, and it’s simple. Pager also allows you to use HTML5 history (not sure if Sammy does?) though it takes some guessing to get wired up, because the documentation on that is awful.

Middle-Tier

I didn’t build out a Web API infrastructure for this app, because I really only need one JSON controller and I didn’t want to add the Web API libraries just for a few methods. MVC can accomplish the same with JsonResult.

One mistake I made was not using the Role provider that comes with SimpleMembership to sort people into Trial, Normal and Admin. I store people’s state in the database in the form of an enumerator. It works, but thinking back on it, using Roles would probably have been more consistent. You’ll notice that I opted to skip the ASP.NET Identity stack here. As I wrote in my previous post

I have a few models and enums for holding data. I also built out 3 repositories for handling data access. In this application, the repository pattern was a no-brainer since it’s all CRUD.

Lastly, there’s a document processor class with 4 methods which each process the data I get from the database and turn it into document files.

Back-end

I store all data in SQL, but I am pretty conservative with how I use the space. Previous developer who built the app 15 years ago stored individual fields as marked records (like, 28a, 14b) so each app user who had 2 forms per position and 40 fields per form had 80 table records per position. With average of 6 positions per user, that’s 480 records per user, and there are hundreds of users.

I opted to go a different route. Forms are stored as JSON blobs. Now a user can have 6 positions – that’s 6 position records, and each position has only 2 records in the Forms table attached. Forms are stored as a string in a Key:Value pair format. Keys correspond to form field names, so when parsing the forms in the middle tier either for retrieval or document generation, they’re trivially easy to process. This also gives me an opportunity to reuse code in both instances.

Hosting

The page is hosted on Microsoft Azure’s Shared hosting plan and the data is stored in Azure SQL. Perhaps I’m a bit biased (I love Azure), but after my experience with mass shared hosting (GoDaddy) I’d rather stay away. The cost for the above is right about $15/month and it comes with the peace of mind you don’t get with GoDaddy.

Wrap up

This app took me just about 90 hours to build from start to finish. Granted it’s not very complicated, it allowed me to apply all I’ve learned to building out a solid web application from the ground up. I already have another project I’m working on now. This one is going to require the module/controller approach in the front-end. I’ve already created the solution for it in VS2015 and followed a pretty specific and rather different process than above. Perhaps a story for another blog post…

#RealWebApp, E2E, Part 1

I spent the past two weeks applying all I know about web application development to a real project for a real client. While I’ve built numerous websites for clients by now, this is the first time I actually built a web application outside of work (where I’ve been building web apps for 2 years now, so I guess it’s not that impressive…) I’ve built a couple personal projects (one of which can be found here) just to solidify all that I’ve been absorbing at work, but until now never had a chance to put it to use beyond the corporate environment.

The scenario for the project is: Users log in with an account created by the administrator and they can add job positions they’re hiring for to their account. Then, after filling out some forms, they can download Word Docx files pre-filled with the data from the forms filled in in the app. Easy peasy, you exclaim! This probably means you haven’t tried integrating with MS Office formats before…

In addition to the above requirements, I added a few things like a Settings panel in which users can toggle autosave, its delay, and the view mode (boxes or tiles) for the position listing. This panel can, in the future, be expanded to store more settings if the app grows. There’s also an administrator panel visible only to the Admin (first user in the database). In the admin panel, you can view, add, delete and edit the current users. You can reset passwords for them (not view passwords though obviously, since they’re hashed), change their status to Trial (there are some trial restrictions in place) and disable their accounts, which will simply prevent them from logging in, while preserving their data.

The app is built on ASP.NET MVC, using MSSQL as the back-end and KnockoutJS in the front. I used my favorite SQL microORM, Dapper, for reading and writing the database. If you’re an ASP.NET dev, you may be scratching your head now; “But Paul, you already had EntityFramework in place, why use a microORM?” In fact, I don’t ever use EF if I don’t have to. Actually, even at Microsoft we don’t use EF in every project. Usually when I start new ASP.NET projects, I start a blank slate and just add the libraries I need off nuget. I’m not a fan of ASP.NET’s Identity either, but 90% of my distaste is its dependency on EF. I heard that’s supposed to change in ASP 6. If it does, I’ll be all over it, because Simple Membership is pretty behind now when it comes to oAuth 2.0 and such…

Working with Knockout has been a total blast. I’ve been using it at work since February, and the more I do, the more I love it. The one and only drawback is its rather lackluster binding debugging support (there are Chrome plugins but they kinda suck – not like Ember’s chrome tools…) Sometimes I’ll have some binding issue and I won’t be able to tell what it is without hunting it down in Chrome tools via the stack trace, which can sometimes be 30+ steps long. That’s one thing that sucks about using frameworks!

In the next part, I’ll talk about the actual process of building the web app from File > New to handing off to the client.

A Year With Knockout

One year ago I was still working primarily in Backbone (at my job), but already looking into other frameworks. Earlier this year I thought I would be all into Ember. Alas, that was not to be. Since March 2015 I’ve been working primarily in Knockout. It’s been a blast!

Despite how Knockout markets itself – a data-binding framework – it’s far more than that. You can write an entire, complex web application with it. The new Azure Portal is written in Knockout, and it’s actually pretty incredible. To me, Knockout is the right mix of defined structure with freedom to use other tools and libraries without too much hassle. Backbone was too lax, and Ember was too rigid.

In addition to Knockout I’ve been using Numeral (number formatting), Moment (date formatting), Pager (for routing), and of course jQuery / jQueryUI plugins to beef up the UX. All this was initially tied together using ASP.NET MVC’s bundling feature which I find very convenient, but as the application grew in scope, so did the demand for modular code. To that effect, I took to NodeJS and Gulp+Browserify. It ties in with Visual Studio 2013 Update 5 pretty well, and with Visual Studio 2015 beautifully.

NodeJS is a bit of a chore to get started with initially, especially coming from the structured world of .NET, but a day and a few tutorials are enough to get up and running with the basics. Gulp is a Node package meant to automate tasks such as minifying and concatenating. Browserify is a package which enables modular code in Javascript, similar to RequireJS. Browserify doesn’t actually asynchronously load modules though, unlike Require… which I think is fine, because who does that in Web Apps anyway?? I would imagine most people who use Require just use r.js to compile a single package for clients to download.

Together with Node, Knockout is a beautiful experience. There are some quirks you have to get used to like prefixing variable names inside your HTML with module names, and instantiating modules inside your viewmodel before using them in the HTML to begin with, but once you master those, everything else just flows like water. If you’re looking for a JavaScript framework to learn or use in your next project, look at KnockoutJS.

Perfect Hard Boiled Eggs

I will share with you what I believe to be the perfect recipe for hard boiled eggs. I generally make these when I need them for an egg salad, but they can of course be eaten straight up, or on bread, or whatever… Ok, here goes:

  1. Put the eggs in a saucepan.
  2. Pour cold water into the saucepan to cover the eggs about 2-3cm (1in).
  3. Turn the heat up to high and put the saucepan on.
  4. Put in half a teaspoon of salt – this may possibly help with the eggs cracking during boil.
  5. Once the water reaches boil, turn the heat off, but keep the pan on the burner.
  6. Cover the pan and set the kitchen timer for 10 minutes.
  7. After 10 minutes, take them off, pour the water out, and pour cold water in.
  8. Pour cold water out after 10 seconds.
  9. You can eat them now, or later, but no later than 3-4 days. If you plan on storing them, put them in the fridge obviously.

That’s it!

Optimize Your Life

I love efficiency. I like a bit slack here and there too, but generally if I’m not making good use of my time, I feel not just guilty, but sick. What is “good use”, you ask? Contrary to what you may be thinking – working all the time, studying, being productive – good use simply means means I can justify the use of my time. Perhaps the return on investment is not phenomenal or non-existent altogether, but the gist is that I have to feel good about what I’m doing.

Sometimes I want to play video games, so I do. Other times I cook and wash dishes just to not sit at the computer. And then on weekends I go on trips or socialize. By no means am I 100% productive all the time, but the time I am, I make sure that I get as much done as possible. Below, I’d like to share with you some tips which have helped me be an effective, productive and stress-free human being. I hope they can help you too.

1. Organize your life.

I used to just “remember everything.” Whenever I was meant to hang out with someone, or I had a business meeting, or I had to buy milk at the grocery store, I would just remember to do it. With a small load of data I managed, but as I grew busier and added tasks to my plate, I began forgetting to do things. There were just too many things happening all at once, all in one day. I started using a task app on my smart phone to log things, eventually moved to Google Calendar, mixed that with Google Keep, and also kept some things in OneNote, in a special physical binder, and on a tack board. Things were pretty much all over the place.

Today, I pretty much leverage technology to do everything. I have a 100gb SkyDrive account which I use to store pictures, my personal projects, presentations/spreadsheets/documents and PDFs. My phone camera auto-backs up to SkyDrive, I always create new projects on the SkyDrive and Microsoft Office saves to SkyDrive by default. I don’t store any sensitive information in the cloud though… don’t quite trust it just yet!

Once Office Lens came to Android I immediately got it and I use it all the time now when I need to turn a physical diagram into a digital note. Theoretically I could have done this with OneNote and Google Keep in the past, but Office Lens is pretty much what got me into it. So now all my notes, any designs I draw or anything from a whiteboard I need ends up on my SkyDrive as well.

I mentioned Google Keep. I use it all the time. Anything that comes to mind, or something I see that I want to come back to later, phone comes out, text or photo gets added as a note. I also have it as a widget on my main phone desktop with stuff I need memorized on top so that every time I unlock my phone I see it. I used this recently to memorize a new debit card pin and a new license plate number, as well as a locker combination. Google Keep stores all the momentary stuff and stuff I may come back to later, and serves as a braindump for things I come up with while on the move.

Lastly, with Cortana out on PC now and hopefully soon on Android, I may switch to it full time to set up reminders. Right now I use Google Now, which is not bad, but it’s just not as personable. Cortana really is a personal assistant, though with a caveat (more on that in another post maybe). I can say “Hey Cortana remind me to buy milk tomorrow after work” and it knows when work ends and when to remind me. You have to set it up first with some defaults, but once that’s done, it’s actually an incredibly useful tool. You can tell it what kind of food you like, what stocks you’re tracking, what sports teams you care about or what cities you want to see weather in. It will automatically track packages (provided it can read your email) and flights and even automatically generate trip plans depending on your destinations (things to see, places to eat, etc).

Tip: leverage technology, use it to organize your life and use your brain for other more important tasks

2. Delegate Tasks

One of the key modern economic principles is division of labor. By Wikipedia’s definition it’s “… the specialization of cooperating individuals who perform specific tasks and roles.” On a large scale, this means that if United States is great at building airplanes and China is great at making t-shirts, then United States should focus on making airplanes and trading them with China for t-shirts. It’s a bit more complicated than that (and you should watch this video if you want to know more), but applied to a smaller scale like my personal life, it means that if I’m not good at something, I should let someone else do it and focus on what I’m good at instead.

You’ve definitely heard the phrase “time is money” before. As cliche as it sounds, it’s actually an extremely important concept which separates the great from the mediocre. “Time is money” plays well with the term return on investment (or ROI) which is a calculation everybody makes in their many times every day. For example, when you hire someone to remodel your bathroom, you’re paying them because you believe that the time you get to spend doing something else is worth more to you than the time you’d spend remodeling yourself. For instance you may have people come in to remodel during the weekday while you’re at work. You may be making more money than it’s costing you to get the remodeling done, though alternatively if you made less money than the cost of remodeling, you may consider doing it yourself as your ROI would be negative. “Buy time” while you spend your own time more efficiently.

Also, use aggregators whenever possible. I read The Verge, Polygon and listen to weekly podcasts to stay current. I also use FlipBoard both on PC and on my phone to have everything I care about in on place. FlipBoard aggregates aggregators. Super efficient.

Tip: Let others do what you’re not good at and if need be pay them for their time.

3. Multitask

This is a quick one. There are times when you should be multitasking, and times when you shouldn’t.

For example, when you’re forced into idle time, do something:

  • Standing in line? Use phone to read news, check e-mail.
  • Driving? Listen to podcasts, news, practice presentations, speeches
  • Commuting via public transit? Burn that phone/tablet battery on something productive.
  • On the toilet? See standing in line above.

Here are some other combinations that aren’t necessarily idle time:

  • Cooking/washing dishes? Watch something.
  • Working out? Watch something or listen to something.
  • On an airplane? Do some work, or sleep if you can pull it off. I can’t.

When it’s time to focus, do not multitask. Turn off distractions like toast messages, put your phone on priority-only mode. Close that Facebook tab. I also like to turn off my e-mail client and set my IM to DND. If someone really needs something from me that absolutely cannot wait, they can come to my office and get me. When I’m coding, I get in the zone for 30-45 minutes and become mega productive. Then I take a short 5 minute break, maybe get up and walk around if I’ve been sitting for a while, then sit down and get back to it. Letting your brain rest is important too.

Use tools like Pocket or Instapaper to save things you find online for later, when it’s idle time. See an interesting article? Pocket it. Have to go to the bathroom? Good thing you got something to read now, eh?

Tip: Multitask when it makes sense. Max focus when in productivity mode. Turn off distractions.

4. Set up your environment for success

This is immensely important, and can make a huge impact on productivity. Imagine you’re editing some photos you took at a wedding and want to post them to Facebook. What’s better for this task – a 13″ laptop or a 27″ powerhouse PC? For programmers and visual designers, work space is immensely important, because it increases their productivity by order of magnitudes. Can you imagine writing an application, debugging and previewing with 1 monitor? You’d have to constantly switch between windows which wastes an incredible amount of brain power as you have to constantly find your place. Two monitors improves productivity, and three is simply legendary. Any more is probably overkill unless you’re watching the stock market or something. I only ever needed 3 as a programmer.

A solid work environment is also important in other professions. A spacious kitchen allows chefs to utilize more space to prepare ingredients for meals without having to worry about cleaning up previously used spaces so as to not hose the taste they’re aiming for with residue. Car mechanics carry tools on them so that when they’re under a car, they have easy access to everything they need. I could probably come up with some other examples, but let’s move on.

Tip: Invest in your workspace. Make it as effective as can be, but also inviting and pleasant to improve motivation.

5. Optimize small things you probably don’t think about

This example is a bit eccentric, so your mileage may vary. I recently saw this speech by Mark Zuckerberg (which I recommend you watch in its entirety if you’re an entrepreneur, here’s another good one) where he said that he wears the same t-shirt every day, because then he doesn’t have to think about what to wear, thus sparing brain cycles and saving time. He has multiple “same shirts”. Additionally he generally eats the same thing for breakfast. You’re thinking “that’s a bit extreme.” I think so too, but when you think about it, saving seconds on small things like that throughout the day adds up to minutes which adds up to hours which could then be spent on doing something else.

Some other small things you can optimize that aren’t as eccentric is using Waze on your phone to find the fastest route home so you’re spending less time in traffic. Perhaps you can come into work after rush hour and leave after rush hour (or before). Go to the store on the way back home. Use the dishwasher.

Tip: Find small ways to save time in your life. This adds up very quickly. You will find that you suddenly have a lot of time to be more productive, and remember, time is money, so…

6. Multipurpose everything

You just bought a TV. Maybe you have a Playstation or an Xbox. So now your TV can play games, and you can watch shows and movies. Hell, if you have a Kinect or a Wii you can lose weight too! That’s a very basic example of multipurpose application.

Another example; you like playing piano. You’re really good at it. Set up a YouTube channel and record yourself. Maybe you’re good at singing? Put yourself on YouTube. Isn’t that how Bieber started out?

Yet another example, this time more professional: You’re learning something new at work. Blog about it. This benefits not just others who read your blog, but yourself. You can come back later and review your post, see how you solved this issue, and maybe get inspired on another issue you’re working on. Additionally employers will look you up and find your blog. There, they will see that you actually know what you’re claiming to know. This is powerful, career boosting stuff.

Tip: Build something once, use it for multiple purposes. This can be very powerful when done correctly so spend time thinking about how it can be applied to your own life.

7. Plan ahead

Learn to analyze important choices in your life and anticipating potential pitfalls. Choose only after careful analysis.

This advice is common sense, or should be, but to many people it isn’t. The first example that comes to mind is having children without sound financial footing. Another is not building credit, which hoses your rating and thus spikes your interest rates. Yet another is not investing in retirement (though this one may be pretty difficult for a large chunk of population).

Apparently I could only come up with money-related examples. Nevertheless you can see why these are important. Especially investing, which nobody teaches you about in school. You should be investing the moment you have your first job flipping burgers, but most people don’t. Did you know that if at the age of 20 you invested $1000 and then until the age of 65 invested only $1000 a year, you would at 65 have over $300,000? This doesn’t account for inflation either (though there’s very little inflation at this time). Read about compound interest, and use this calculator.

Tip: Planning ahead is extremely important. Use common sense, and use tools to help you with planning.

8. Start easy, go big

Don’t start on the hardest problem in the queue. By starting small, with things that are easy, maybe things you already know how to do, you can get a running start so that when you finally hit that wall, at least you have a chance to bust through! That’s sort of a terrible analogy… I’m seeing this crash test dummy fly through the windshield of a Civic in my head.

Someone gave me this advice a while ago. It’s golden. I apply this to everything I do and I’ve had great success both at work, at home. Recently I started to learn to cook various things and whenever I start a new recipe, I begin with things I already know just to get running. Once I have the veggies steaming and the rice cooking, I can’t just quit cooking. I gotta continue making the protein! At work, I generally start with the front-end and the app architecture which I’m familiar and comfortable with, and then later dive into the problems I’m hazy on. At this point I already have code in place that does stuff, code I can be proud of, so tackling design or functional problems is simply a matter of typing the right query into Google and praying someone already had this problem on StackOverflow. I joke, I joke. Or do I?

Developers spend most of their time applying other people’s solutions to their own problems.

Tip: Don’t try to do everything all at once. Start small, smart with things you know, then go from there.


I’m sure there’s something I’ve missed, but this is already probably the longest blog post I’ve ever written. I’m really passionate about this so feel free to leave a comment and ask questions about anything I’ve written here. I have a feeling as I grow my own career, I will post more advice here. :-)

New Horizons

There are a lot of new technologies on the horizon. Virtual Reality is just around the corner. Microsoft’s Hololens project is now a thing that developers can build apps for in Visual Studio. Wearables have been around a few years now (though it doesn’t seem like the market for them is very big). Apps for various devices like TVs, cars and even refrigerators are serious business. All of these new technologies have different user experiences and different developer technologies.

The Hololens specifically is incredibly interesting. Microsoft announced that if you know how to develop a Universal Windows App, you will be able to develop for the Hololens. Does that mean that if you know how to build stuff in C# and XAML, you’re good to go? Sign me up! Hololens reminds me of these videos by Microsoft about how we’re going to be productive 5 years from now… we have the technology, but the red tape… it’s too thick!

Anyway, with all this exciting new tech, I’m wondering what direction I should turn to continue developing my skill set:

  1. Continue front-end development (JavaScript frameworks)
  2. Develop server-side applications (ASP.NET MVC, WebAPI)
  3. Focus on improving my data storage and access knowledge (SQL, NoSQL, Cloud storage)

Internet as we know it is going to be around for a long time. We’ll be looking at LCD screens 50 years from now, or even if we won’t, user experience is likely going to be very similar. Imagine that even in a Hololens environment you tap a virtual screen in front of you, and inside it there may be an iframe with pre-formatted HTML content that may be interactive via JavaScript. You tap arrows on the side of the screen to flip through the articles… or eye-tracking technology sees you’re almost at the end of the paragraph, pre-loads the next page, and based on the average reading speed, gently fades the text to the next page as you reach the last word. We’re almost there…

Server side technologies will probably be around forever. Those pretty front-ends need data to be pretty, and that data comes from APIs. In the new version of MVC6, WebAPI is merged into the framework which means that learning ASP.NET MVC6 will cover all corporate web development scenarios. There’s a fair bit of intricacy to server-side code, especially since writing well formed and speedy queries is very important when dealing with large chunks of data. Even still, .NET is not a huge flustercluck that the JavaScript world is.

I have the least experience with data storage and retrieval. Sure I can write SQL queries, nest them, put them in a stored procedure of a function, add variables, virtual tables and run performance analysis, but the world of data storage is so much more complicated and more vast with “new” storage paradigms like NoSQL breaking the mold. Microsoft’s COSMOS, maybe conceptually not too difficult to grasp, looks pretty damn intimidating from afar. Also, not available to public to learn! I think I need to brush up on the new non-SQL solutions just so I at least have an idea of what’s out there.

New Windows comes out in 20 days, and new Visual Studio in just 10. Despite probably over 10 hours of Build, dotNetConf and other podcasts under my belt, as well as a pretty thorough read of the ASP.NET 5 documentation, I feel like I have a long way to go still. The unknown has not been this exciting in a long while.

This time in two years I hope to have built my first Hololens app.

Land of the Rising Sun: A Summary

I spent the past 11 days in Japan. It was an absolutely amazing experience, unmarred by the rush of organized travel. I flew to Yokohama and from there, with the help of a few friends, I went and saw places. My impressions are below. I decided to divide them into likes and dislikes, because unlike during an organized trip, I was afforded the time to converse with the locals and get their take on life in Japan, which in turn gave me a much more complete perspective on various aspects of this country. It’s one thing to go see ancient ruins and another to walk the streets and ride the subways with the locals.

Likes

  • Food – I love Japanese food. I actually love anything that comes with rice, but the Japanese seem to have mastered the art of preparing rice based dishes beyond that which I’ve witnessed living in Seattle. Each dish, despite looking similar, may actually be called something completely different depending on presentation or spices used. In addition to regular food, it’s incredibly easy to find a bakery overflowing with delicious sweets ready for the taking. Dangerous.
  • Infrastructure – Train network is off the hook. You can get pretty much anywhere via a train, and if you can’t there’s a bus that’ll take you there. If you’re going somewhere where there’s no public transportation at all (wtf?) you will drive on the cleanest and most robust freeways I’ve ever seen. Infrastructure in Japan makes United States look like a 3rd world country. I’m going to be depressed driving the I-405 to work every day now.
  • Women – Everywhere I look, pretty girls. It’s like a completely different world here compared to Seattle. I mean sure, we got pretty girls too, but the volume difference is so stark it’s a little upsetting. Women take care to look good, but they also know how to dress. Sure, there are short shorts, but there are dresses and skirts and they’re not ashamed to show a bit of leg. Again, going to go back to Seattle knowing that across the Pacific there are incredibly good looking women, probably mostly single (src). Also, that dark skin… mmm… There are so many other good things about Japanese women, but that’d be like a post of its own so we’ll stop here.
  • Hospitality – It’s true what you hear about Japanese “omotenashi” (hospitality). I was always treated with respect wherever I went. That may be because I’m a foreigner, but ultimately it’s what formed my opinion. They always say welcome, thank you, come again, etc.. I never expect it at home, but it is kind of nice to hear now that I’ve gotten used to it. I’ll miss it.
  • Fashion – Men’s fashion is pretty metrosexual, and unfortunately Japanese men could easily be mistaken for women. I’m generalizing of course, but really I made a mistake several times on the train. Saw a chick, wearing a hat, short shorts, blouse.. was actually a dude. Anyway, back on topic. Fashion in Japan is similar to probably the rest of the civilized world minus North America. It’s just damn good, that’s all there is to it. Oh, also, traditional kimonos make anyone wearing them look absolutely amazing. Love it.
  • Japanese English – … is either hilarious or incredibly cute. Some Japanese can actually pronounce R and L correctly, as well as TH and X. Some can’t. Those that can’t sound really funny, but sometimes are also difficult to understand. Those who can speak some English and have good pronunciation sound really cute. I don’t know what it is… like, English is also my second language, but I bet I didn’t sound nearly as cute when I was learning to speak it. In addition some of the English writing in advertising, or on t-shirts or even signs is pretty comical.
  • Convenience – This is kind of a double-edged sword, and I’ll explain in the dislikes section. There are convenience stores everywhere. It’s awesome, because if you’re hungry and on the go, food’s a stone’s throw away. Forgot your umbrella? Np. Got mustard on your white dress shirt? Conbini got you covered. One thing I didn’t see (and I looked, just out of curiosity…) is condoms. Maybe I didn’t look.. hard.. enough. In addition to convenience stores, there are vending machines pretty much everywhere. Even in the the most remote village in the mountains you can get a bottled ocha (green tea) or even a Coke Zero.

Dislikes

  • Convenience – Easy breeds bad habits. Store near my hotel basically meant that instead of having a real breakfast, I could just grab a couple sandwiches, an onigiri, a melon bread and a juice box and be on my merry way. Of course the calorie intake there is ridiculous, but also the food besides being filling enough is actually very poor quality. Convenience stores and vending machines are also a very convenient way to end up with less money than you want to have. Again, easy breeds bad habits.
  • Urban Development – Tokyo may end, but the grey doesn’t just end there. 30 million people gotta live somewhere, right? Japan can be very serene in remote places, but the illusion of wonder disappears within seconds of stepping food back on a dirt track or gravel road. Suddenly, vending machine. A wild parking lot appears. It uses flashing neon advertisements. It is super effective. I know the Japanese pride themselves on their care for nature and related traditions, but other than the pretty green hills, Japan has nothing on the Pacific Northwest. When you leave the city in the PNW, you’re actually in real wilderness.
  • Inequality – Japan is still a deeply traditional country. With some of the awesome traditions like seasonal celebrations, come terrible ones like the “women belong in the kitchen” stigma. Women make 0.76 of what men make here working the same jobs. It’s even worse than some of the southern states in America… and that’s saying something. In addition to gender inequality, the social norms regarding things like recreational drugs, marriage equality and women’s right to choose are almost medieval. Thankfully with the younger generation getting to vote, things are slowly changing for the better, but it will be a generation before Japan catches up to the more progressive countries.
  • Work Life Balance – I love my job. But I also love my time off. Despite how hard working Americans are, we still get time off, because employers know that a happy employee is a good employee. Japanese firms seem to have missed the memo. Out of 8 people I’ve met here, they all work so hard and only get 1 week of vacation a year. Then, even after they take their vacation, they come back to work and apologize for inconveniencing others. If I had to work in these conditions, I would jump in front of a train too (which btw happens moderately often here – it happened just today on the Sotetsu Line!)
  • Consumer Culture – If America invented the consumer culture, Japan took the concept and ran with it. It’s overwhelming. Come to Japan and try to walk a block without seeing a shop and a shop keeper imploring you to wander in and see their wares. Sometimes I would walk into a building thinking it was a museum or just a passage somewhere, and I’d find boutiques, conbinis or at the very least vending machines. In Japan, if you’re not buying something every minute of every day, you’re doing it wrong. This is actually a pretty complicated subject and a lot of what I don’t like is actually thanks to American influence… but yeah, I don’t like it one bit.
  • Homogeneity – Everybody is Japanese. Foreigners are pretty rare to spot in Japan. Sometimes I would walk into some area, and every second person I looked at would have their eyes on me. Was funny at first, got annoying pretty quickly. Old people are especially guilty of this. However, one time I went to buy something and the cashier never even looked at me once – only spoke to my Japanese friend and even started handing her the change!! Wtf, rude! There’s something to be said for living in a multicultural society like Seattle…

All in all, my trip was amazing. I met fantastic people, saw temples, shrines, castles, gardens, sang karaoke, dipped in hot springs, ate delicious food (home cooked meal even!!) and traveled the countryside. I experienced a tiny bit of what Japan has to offer, but I loved it. And now… I’m ready to go home.

Many JavaScript Frameworks, handle it!

Props if you get the reference.

Over the past month I’ve been digging deep into the front-end development world, focusing on the Javascript end of things. While working primarily with Backbone over the past year, I didn’t get a chance to play with anything else, but recently and coincidentally right before losing my job, I became interested in Marionette. Marionette gave Backbone a purpose, added the much needed view disposal, promoted structure and abstracted boilerplate. However, I then discovered Ember and now I’m learning and using that instead. Tomorrow I have an interview where Knockout is the framework du jour, and on Wednesday another interview where Angular knowledge is preferred. I haven’t looked into Angular at all recently due to the fact 1.* is being tossed to the wolves and 2.0 doesn’t even have a valid spec out… so that’s going to be an interesting conversation.

I think at this point, until I get a new job, I’m just going to learn and use Ember. I really dig it. Along with Ember, I’m going to try and build a responsive web app, sort of similar to what Zurb’s Foundation for Apps is trying to be. Foundation doesn’t seem to be using flexbox at all though, which is somewhat puzzling given how much they praised it on their blog. Anyway…

Whiteboard coding sucks

Title says it all. I’ve had two interviews so far and both had me coding on a white board, and both I sucked bad at. Meanwhile I can sit in Visual Studio and knock out stuff in minutes with very few if any errors. I understand that the interviewers are looking for competency, but damn… The one interview I had last year where I was doing “live coding” on a computer in Visual Studio I aced. Wrote a full working AJAX app in 20 minutes, complete with styling. When I code stuff on the whiteboard though, it’s like I completely forget why I’m even there. Anyone else have this issue? -_-

Other questions, even design questions that require a whiteboard I can answer well. Ask me how to design a system, how something works, draw a diagram, whatever.. but not code. Please.

Awesome Front-End Dev Podcasts!

I’m just going to leave this here.

http://www.funnyant.com/category/podcast/

I listened to all of them and I must admit some of these people are .. well, inspiring to begin with. Second, I am truly excited to try out EmberJS. Third, I really like Backbone and Marionette, but I am super excited to try something new on my next project.