Browsed by
Category: Coding

Hololens Tutorial: Let it snow!

Hololens Tutorial: Let it snow!

With the spirit of holidays fast approaching, I decided to write a short tutorial on how to add snow to your apartment. In Hololens of course 🙂

This tutorial assumes you have a Hololens and it’s ready for development. If you haven’t paired your device yet, please follow these instructions on how to do so here.

1. Getting started with HoloToolkit

First, let’s Open Unity and create a new 3D project. Please be aware that you need at least Unity 5.4 HTP (Hololens Technical Preview) or Unity 5.5.

Hololens Tutorial

The next thing to do is to import the HoloToolkit, which is provided for free by Microsoft. There’s two ways to do this

Using Git – just clone the repository and grab the Unity package
  git clone https://github.com/Microsoft/HoloToolkit-Unity.git

OR

Go directly to the GitHub project page and download the unity package file.

Once we have the unity package file for the Holotoolkit let’s import it!

With the Unity project open, click on Asset -> Import Package -> Custom Package and select the downloaded file.

This will prompt you with the dialog to select the files to import. I suggest importing all the files, although you can skip the example ones.

Hololens Tutorial

This will basically give you access to all the cool toolkit tools for Hololens. In this tutorial we will only use the Hololens camera and the voice activation.

Now your scene should look like this:

Hololens Tutorial

2. Setting up the Hololens Scene 

First, select the “Main Camera” and remove it. We will replace it with the Hololens Camera. Next, since we don’t need a sun and ambient light, select “Lighting” from the upper-right hand side and remove the skybox. Also, from the ambient source drop down select “Color”.  Your pane should look like this:

Hololens Tutorial

Now let’s add the Hololens Camera.

From the Assets folder, navigate to HoloToolkit -> Utilities -> Prefabs and select “Main Camera”.  Drag and drop it on the scene, and make sure its position is reset to origin.

Now let’s add a simple 3D cube, with the following properties so we can test our scene:

Hololens Tutorial

Now save your scene and we’re ready for the first test!

3. First Deployment to Hololens!

Holograms are expensive to render, so let’s tune down the graphics to make sure we get the best experience possible.

Go to Edit -> Project Settings -> Quality

On the right hand side you will see a menu similar to this:

Hololens Tutorial

Under the Windows Store logo, at the bottom, click on the upside-down arrow and select “Fastest”.

Great, now let’s set up the build settings.

Hololens Tutorial

Go to File -> Build Settings

In the popup, select Windows Store and click “Switch Platform”. Add the current scene by clicking “Add Open Scenes”.

From the drop down menus, select the following options:

SDK: Universal 10

UWP Build Type: D3D

Build and run on: Local Machine

Select C# Project option.

On the right hand side, find “Other Settings” and select “Virtual Reality Supported”.

Phew!!! Ok, now click “Build”, we are not done yet 🙂

You will be prompted with selecting an output folder. Best practices says to create a new folder called “App” inside your project and build in there.

Hololens Tutorial

Wait for Unity to finish building. When it’s done, you will be prompted with a window. Navigate into the newly created ‘App’ folder and find the Visual Studio Solution file (In my case is SnowDemo.sln).

Double click to open. This will open the Visual Studio project.

At the top, please make sure you have selected “Debug”, x86 as a platform and “Remote Machine” (which you should have configured from Step 1).

Hololens Demo

Now for the moment of truth! Make sure Hololens is running, and press Ctrl + F5 to start without debugging!

If everything goes well you should see this in your Visual Studio console:

Deployment complete (0:00:14.434). Full package name: "SnowDemo_1.0.0.0_x86__pzq3xp76mxafg"
========== Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========

Hololens Snow Tutorial
Hololens Snow Tutorial

4. Adding the Snow

Awesome! We have a cube in our living room now! It’s time to add the snow.

The snow is basically a particle emitter with the following configuration:

Duration: 5.00
Looping
Start size: 1
Max Particles 500

Emission
Rate: 200

Shape
Cone
Angle: 25
Radius: 2
Length: 5
Emit from: Volume

Velocity over Lifetime
x: 0.1 y: 0.1 z: 0
Space: Local

Limit Velocity over Lifetime
Separate Axis – YES
x: 1 y: 1 z: 1
Space: Local
Dampen 1

Collision
World
Collision Mode 3D
Dampen: 1
Bounce: 1
Max Kill Speed 10000
Radius Scale: 1
Collides With: Everything

Renderer
Render Mode: Billboard
Cast Shadows: Off
Min Particle Size: 0.01
Max Particle Size: 0.03

If you don’t want to type all that stuff, just use the pre-fab that comes with the project (github link at the end)

So now your scene should look like this

Hololens Tutorial

Now for the final moment of truth!

Rebuild and run the app on Hololens!

Hololens Snow Tutorial Final
Hololens Snow Tutorial Final

How cool is that? The holiday spirit right into your living room! All the source files can be found on GitHub here:

https://github.com/papiot/hololens-snow-demo

If you found this tutorial useful, please star the repository 🙂

Facebooktwittergoogle_plusredditpinterestlinkedin
Hololens – what can it do?

Hololens – what can it do?

So I took the plunge and purchased my Hololens dev kit back in June. I started playing with it and immediately saw the following facts:

  1. The Field of View is very small
  2. The quality of the camera is low
  3. It only works really well in not too bright and not too dark rooms
  4. It’s very expensive ($3,000)

So it sucks, right?

Wrong.

This is the coolest piece of technology that has hit the consumers since the transistor radio. Hololens is an Augmented Reality device. It’s a device where computer generated effects and holograms are placed in your real world. You can interact with them and they can interact with the real world.

  1. The field of view is small, but you only use about 6° to focus on stuff, so the experience is still awesome (plus, I am sure the FOV will get bigger in the next iterations).
  2. The quality of the camera will improve with future iterations – it’s still better than what we had 5 years go as webcams.
  3. This will get better as the camera becomes more sensitive. Also, you could probably add an ultrasound sensor to use radar technology to help map the room better in low light conditions.
  4. It’s expensive because it’s not massed produced yet.

Augmented Reality is not new. Fighter jets pilots have used it for decades. But the problem has always been the cost. Building AR for the military costs a lot of money and there was no hardware to support consumer-level AR.

Nowadays, we all have a quad-core CPUs in our pocket with a pretty fancy graphics card, so the technology advanced rather quickly. This has lead a few companies to start a race for conquering Virtual and Augmented Reality.

Hololens’s shortcomings mentioned above are rather just missing features due to iteration. In other words, the field of view will get bigger, the price will drop, the sensors will be better so that you can wear it in very bright rooms and very dark ones as well.

So what can you do with it? Here are a few things that someone can do with an Augmented Reality device, such as Hololens:

Add Stuff to Your World

holo-astro

I can create a hologram, and place it in front of me. How cool is that? I can look at it, I can walk around it (remember, I am not wired in to anything). I can get closer and further from it. The software will recognize walls and objects so it will “hide” behind corners – this one bit will give you a true feeling that whatever object you added is really there.

What about in the future?

So now you can add 3D objects exported from programs such as Blender or 3D Studio Max. But what about live objects? Can I see my mom which is 7,000 miles away as a hologram in front of me so we can chat? To do this right now, my mom would have to be in a special studio, surrounded by green screens so that she gets filmed from all angles and then turned into a hologram and then broadcasted into my field of view. This is not really possible in a practical way right now, but I am sure this will change in the next few years.

Negative Spaces

It’s nice to add things in your field of view, but it’s even nicer to add it behind stuff. One of the coolest examples is the Robot Raid game and the Origami Demo.

Hololens basically maps out your surfaces (such as walls or floors), an explosion occurs, and then a mask is added on your floor to make it look like there’s a hole and you can see through the hole in another world.

It’s truly fascinating stuff!

Physics

Another really brilliant aspect of the Hololens experience is that the holograms which you add to your world can interact with your environment. So if you place a holographic ball on your coffee table and make it drop down, it will bounce off the floor and roll, just like a real one would.

This opens endless possibilities of interacting with your environment. This could have real world applications from coaching to games!

Spacial Awareness

This is where the headset really shines. It is really good and really fast at knowing exactly where you are in the room.

I was blown away by it’s responsiveness and accuracy while doing the Spacial Awareness tutorials. Above is a short clip of me, moving around in my living room. Notice how you can also see the direct in which I am looking.

Live Camera

Another cool feature is the live camera, and this can be demoed directly out of the box. Hololens comes with Skype, and when you connect with someone, the other person can actually see what you see through your Hololens.

And check this out: not only they can see what you see, but they can add stuff to your world – such as holograms, arrows, stuff.

This is great example on how Hololens type of technology can be used for field workers, remote workers, medical, etc.

Sharing Co-ordinates

And for the last cool feature: how can you have nice hologram experiences if you don’t share them with your friends?

A really cool feature of the entire ecosystem is having multiple people, each sharing their own Hololens in the same room and interact with the same holograms in the scene.

Conclusion

Hololens and all the Augmented Reality glasses might be a few years away from a consumer product, but the potential is beyond huge.

We could be using this not only for entertainment purposes, but to solve real human issues, provide security (just imagine combining hololens with drones), and automate many manual processes.

I feel like we are living at the edge of a huge technological breakthrough, and that’s very exciting!

Have you used a Hololens yet? How do you feel about it?

Facebooktwittergoogle_plusredditpinterestlinkedin
Playing Starcraft Taught Me a lot About Running a Business

Playing Starcraft Taught Me a lot About Running a Business

Playing video games and running a business is probably the last thing that comes to mind to most MBAs. One cannot possibly understand how a game, created for entertainment purposes, can potentially be helpful in managing a business. In reality though, there are a lot of similarities between a game of Starcraft and running a business. And when the capitalist competition is fierce, finding inspiration in the odd places can make the big difference sometimes!

A little bit of intro about Starcraft for those who have never played it. Starcraft is a futuristic Real Time Strategy game. There’s robots, aliens, weird aliens and space ships. When the game begins, you, as in the player, has a bird’s-eye view of the entire map, which is the battlefield. You start with a home base and a few workers. The enemy starts with the exact same set up, but on the other side of the map. The point of the game is to build an army and battle the enemy until you destroy all their units and buildings. As a player, you control all the units and and production of the game, so multitasking is key.

The game has an internal economy. Every unit or building built needs one or both of the resources available on the map. These resources are called minerals and gas. There’s a third type of resource – supply. This is really the equivalent of housing or number of desks and chairs you have in our office for employees to use. I’ll come back to this later.

So we start with a home base, a few workers, and the point of the game is to collect resources, build units and buildings, upgrade the units, make sure there’s enough supply buildings for each unit. Once you build the first solider units, you send them scouting and they can engage in fight with the enemy. In a nutshell, that’s what the game is about.

So how is this similar to running a business?

1. Multitasking

The first thing that a Starcraft player realizes is that they have to be awesome at multitasking and switching context. When you start a business, you have to switch from hiring people to raising capital to doing sales to doing marketing. In the game you have to constantly switch between harvesting minerals and gas, building buildings, producing units and scouting the map. In Starcraft you end up going through what I call a “multitasking loop” where you do something like this:

  • Check that resources are being harvested efficiently
  • Scout the map
  • Produce war units
  • Make sure we haven’t reached supply limit

In the game, this multitasking loop happens once every 7-10 seconds on average. In the business world the loop might look like something like this:

  • Check that cashflow is strong
  • Discuss with sales to make sure sales are ok
  • Talk to marketing and engineering teams to make sure the products is on track
  • Make sure the team is happy, everybody has work to do, but not TOO much in a way they feel overwhelmed for long periods of time

In the business world this loop usually happens once a month or once every 3 months, usually during month-ends or quarter ends.

2. Micro-Managing and Macro-Managing

In every game of Starcraft you have to do both micro and macro managing at some point or another in the game. Especially in battles. Depending on the battle, sometimes you have to just let the units do their thing, while only telling them the general direction they have to fight; other times you have individually pick units  and move them around during the battle to maximize your success. Both methods have pros and cons. Micro-managing every unit will result in better odds of winning, but it’s not sustainable. In other words, there’s only so much one can micro-manage, and if the competition doesn’t do that, then they will have clear advantage.

Some goes in business. For every project your business executes, you, or your managers, can either micro manage or not the employees. In reality there’s a combination of both. And it’s a great skill to know when to micro manage and when when to just let it flow. A great example of micro-managing would be very close to a deadline when it’s important that certain things get done at a certain time, or when doing something for a super important client or project and you have to make sure the work is beyond flawless.

But you have to be careful because, just like in the game, micro-managing comes with a price. Overworked or unhappy employees and lack of focus from the big picture. In the game, if you micro-manage a battle, you might end up having your home-base invaded without even realizing.

In general, I think 90% of the time should be spent macro managing and 10% micro managing, usually around key milestones.

3. Resource Management

Every business manager knows the importance of resources. Resources come in different shapes: money, acquisitions, talent, IPs. In Starcraft, besides minerals and gas, you also have the terrain that’s around you and the technology tree (a way to upgrade your units). In a business, you’d send some of your selected staff to training, maybe to complete a masters degree. They will have more knowledge and then contribute as a higher resource to the company.

Money (or rather cashflow) which is the biggest resource of them all can come from multiple sources. In business it’s called revenue streams. In Stracraft is called “expanding your base”. It is important from early on in both cases to expand and to make sure you have at least 2 different revenue streams at all times. Also, just like in the game, it’s not a good idea to sit on big piles of cash – you should always invest anything extra into making the product better and creating even more revenue streams.

A more gruesome way to think of resource management is what happens after a battle. In the game, sometimes you carry a battle and you end up loosing 80% of your units. You quickly go back to your base and notice that some of your remaining units are wounded or broken. So you spend resources to fix or heal them. The exact same thing in business – maybe you’re having a rough period and you’re down to the core staff – you need to spend resources to make sure they don’t end up leaving. Or you can just let them go to cut your losses.

4. Scouting out the Competition

Sometimes keeping an eye out on the competition is just as important as it is on your own business. When running a business you have to understand that the competition is most likely doing or thinking exactly the same things as you are. One of the most important things in Starcraft is sending out scouts all over the map to check out what your opponent is doing. Otherwise you will end up with an entire battalion in front of your base and you won’t have time to react.

The competition in some instances is so drastic that big companies such as Apple and Microsoft make engineers sign disclaimers that they won’t leave to work for the other company.

Another method for scouting in the business world is to have your company set up in a city where a major university is present. For example, RIM (the producer of Blackberry) had their headquarters in Waterloo, Ontario, a place where the local university is a world famous math and science university. Elon Musk’s decision to set the headquarter’s of SpaceX in Southern California was because of the high ratio of aerospace engineers per capita.

So just how in Starcraft the player continuously scouts the enemy and new resources, in business you have to constantly look for fresh talent and keep an eye on what the competition is doing.

5. Adaptability to Change

Just like in real life, things change. Things don’t work out the way you expect them to do. So you must adapt to fit the new scenario. This is the most important thing I have learned from Starcraft when it comes to business. You start out with a plan, kind of a step-by-step plan on how to do. And then, without question, about 30% into your plan, something happens and you must adapt, thus discarding the old plan and creating or adapting a new one.

The most important thing to keep in mind when a plan changes is not to neglect the 2 most important thing: the resources (the cashflow) and whatever units you have left (the existing employees). In the game, a secondary base might all of the sudden become your primary base, especially once the minerals have depleted from the initial one. Same in business: a secondary or unexpected revenue stream might become your main one, depending on the market, demand and things you cannot control (such as how technology changes around you).

As a good leader you have be able to adapt and pivot to make sure you always maximize all the revenue streams given the current resources, or else you will fail fast. Too many resources are also a problem, although a better one. If, let’s say, you end up getting a huge round of investment and you don’t plan accordingly and hire the right people to help you grow slowly, you will not only crash and burn, but you will also waste the investment.

Cashflow, especially the passive kind, is the most important thing to nurture in a business. Maybe one day it will be your business lifeline. And it’s ok if the cashflow is not 100% in line with your primary business, as long as it’s there and you take care of it. And this brings me to the next point:

6. Decisions

Decisions are another important aspect of playing Starcraft that relates to business. In the game, just like in a business, you have to constantly make decisions. Big decisions, small decisions, good decisions and bad decisions. It’s a way of life. The problem comes when you hesitate or don’t make any decisions at all, that’s when you’re in trouble.

In the game, around the 2-3 minute mark you have to decide if you should expand or not. Sometimes one decision is better than another, but you don’t know that. However, both decisions (to expand or not expand) are better than no decision at all. No decision means you send 3 “workers” to the expansion area and keep thinking about weather you should expand or not for another minute. In that minute you lost the power of those workers to generate minerals or gas, and the opponent has already made a decision and now they’re ahead of you.

In a business making wrong decisions is much better than making no decisions at all. Because making a wrong decisions will teach you a lesson, and in the future you will make better and better decisions, but making none at all will keep you in the same place. And speaking of experience…

7. Experience

Experience in both the game and business will make you better. In Starcraft experience means playing many games, in real life it might mean running an entire business your whole life, or starting multiple business along the way. But I believe that even if you run the same business for many years, the sub-projects are still mini-businesses on their own and all the benefits of running through complete lifestyles will come in handy.

Starcraft is just a game to many people, and in reality it is made for entertainment purposes. The fact that it trains your brain to act quickly, multitask and set a greater strategy are just side-effects of its original intention. However, with a world that saturated in some areas it’s great to find inspiration in things your competition might overlook.

Drawing parallels between things that appear to be completely unrelated is a great way to exercise your brain muscles. I challenge anyone reading this publication to think of other completely unrelated things that can be paralleled. For example, can you think of a way how playing tic-tac-toe is similar to negotiating a sale?

Facebooktwittergoogle_plusredditpinterestlinkedin
The hidden competitive advantage of Virtual Reality products

The hidden competitive advantage of Virtual Reality products

A secret gem and endless source of information about investment and management can be found by reading Warren Buffett’s annual shareholder’s letters. And what better way to spend a Sunday afternoon but to read through these old publications?

So in one particular case, Warren (yeah, first name basis!) explains a very simple, yet extremely important aspect of an emerging technology which people completely disregard: the competitive advantage.

So what does this mean?

People tend to overvalue every company and product that is visible when a new industry emerges and they tend to infer that a new technology automatically means investment opportunity in all directions. But it’s not quite like that, as Warren explains. Just because a new technology will change the way we live, which means huge long term growth, that doesn’t mean investing in ‘anything’ related to it is a good idea.

Let’s take some examples:

At the beginning of 20th century, there was no doubt that the automobile would change forever our life and that the automotive industry will grow into the distant future. And it did! However, this is a list of roughly 1000+ car manufacturing companies that existed in the United States alone! Out of these, only 3 survived! It turns out the same is true for the airplane manufacturers, and we all the know the fate of the .com bubble.

So now we have a new technology which I am convinced it will change us forever – Virtual Reality (and all its flavours of VR, AR, Mixted Reality, etc). All of the sudden we have a similar scenario: an industry that will grow as a whole, and many many companies and products are trying to get a pice of it.

As an investor, you shouldn’t throw your money at everything that moves and has VR in it, because most of these companies will disappear soon. Of course this doesn’t mean that the current companies and products are not profitable – they are, and they will be, but not long term! As a long term investor, you should not bet big just because they’re part of a hot industry.

So in a hot industry, with a relatively small entry barrier, how do you know which companies will persist in the long run and which will flop? The answer lies in the management. In an industry that’s like stardust – hot, forming planets, and not knowing how many and where they will be, it’s important to have leaders that can converge long-term vision with short term adaptability.

Today you are selling software and headsets, tomorrow those headsets will be obsolete, so the value will be in the software alone. In a few years, some other device will appear that projects straight onto your retina – so your value returns to a software/hardware combination.

In conclusion, although it’s impossible to map out what will happen with an emerging technology and how to invest in it, you could follow the above advice and look very closely at the founding team and their vision. It’s what will make the difference between small, insignificant products, and large successful ones!

Facebooktwittergoogle_plusredditpinterestlinkedin
360° Video vs 3D Video vs Virtual Reality

360° Video vs 3D Video vs Virtual Reality

Many people use 360° video, 3D Video and Virtual Reality interchangeably. This is wrong and leads to a lot of confusion. So here is a quick overview of what each is, and where I believe the technology is heading.

360° Video

360° video is video that’s filmed in 360 degrees, but with no depth of field. This is the most common type of “VR” videos at the moment. Facebook just launched support for these videos on their timeline, so anyone with the right camera can film and upload a 360 degree video. So what is it? It’s really a video that captures a dome-like panoramic view. When you watch the video, you can move around the camera so you can see in different directions (note: not different angles). So if you use 360 video to shoot a skydiver, you can see what they saw, except you have the option that every time you watch the video to look in a different direction.

Here is a great example of such video. Notice how you can turn around the camera, but you cannot move it. In other words, you can’t move the camera so that you get a another angle of the shooting. You can watch these type of videos on youtube and on the Facebook timeline. You can use your mouse to move the camera around. Alternatively, you can watch these on your cellphone combined with a 3D Headset. When you do this, you will be able to move your head around to control the camera direction. This will give you a great deal of emersion, but it is still not 3D!

Some examples of cameras that can shoot 360 videos are found here and here.

3D Video

Now, the real deal is 3D video. 3D video gives you depth of field. To consume 3D video, you will need a 3D headset and a good cellphone. The experience is similar to what you’re used to at the 3D movie theatres, only much better. This technology is fairly new and rather expensive.

Here is an example of a 3D video .

You can notice a major difference between the videos: the 360 video is full 360 degrees, but no depth of field; whereas the 3D video has depth of field, but the viewpoint is limited.

As technology gets cheaper, all the 360 videos will become 360 3D videos! I hope that makes sense 🙂

Virtual Reality

Virtual reality is just a specific case of 3D video, where the entire scene is NOT filmed, but computer generated. In reality (no pun intended), we are using the same technique: stereoscopic rendered images. In a 3D Video, this is filmed using special cameras such as this:

Source: http://cdn.techpp.com/wp-content/uploads/2011/12/jvc-3d-camcorder.jpg

But in Virtual Reality, all the content is computer generated using special programs such as Unity or Unreal Engine.

The future of Virtual Reality

I think the near future will bring us many different cameras and ways of doing this, until everything will merge into pocket size 360-3D cameras. Also the devices we use right now to consume this, will be so small they will fit on a contact lens.

I hope this article will shed some light onto this amazing new technology!

Facebooktwittergoogle_plusredditpinterestlinkedin
Casual games compete with Facebook and YouTube

Casual games compete with Facebook and YouTube

A buzzword when releasing a game or when trying to raise revenue to develop your casual game is “competition”. Usually when releasing a game, you might think the competition is another game of the same type. Or other games in general. But the reality is that your game will be in direct competition with Facebook, YouTube, Netflix and other content consumption service. So when you think about releasing that “match-3” type of game, you’re not only competing with another 10,000 existing titles of the same type, but you are also competing with people scrolling on the Facebook newsfeed. yayks!

 

Imagine a regular 30-something year old person, who has a job. If you think about their typical day schedule, you realize that most of the day is taken up by activities such as work, sleep, eat, talk to friends, etc.

A regular person who works 9-5, commutes 1 hour and sleeps the regular 8 hours  a day, will be left with only XX hours of entertainment a day.

Suppose the person wakes up at 7am and it’s at work from 9 until 5pm. This really means that she’ll be home around 6:30, have dinner and/or meet with friends and by the time she gets to unwind, it’s already 9pm. Suppose that our person lives a sort of healthy life and they want to be in bed by 11. This leaves them with only 2 hours for entertainment. Everybody is fighting to capture those 2 hours – Facebook, popular shows such as Walking Dead, Game of Thrones, Suites – yes – when you release a little free game, you are directly competing with Game of Thrones! Good luck with that!

So here are some things you can do as a game designer to maximize your chances that someone will play your game:

Don’t make it free!

When you make a game free, you are automatically undervaluing your work. Although it works in some cases, I am a strong advocate against free and freemium games. You can release a demo, or a video or a level, but making in-game purchases will take away from the value of the game and turn it into a casino game.

Provide quality content, puzzles and a story

Tapping the screen to keep the bird flying is not very smart. It’s not even hand-eye coordination. It’s just mindless time wasting and it’s the same type activity one does when scrolling on facebook. And guess what, someone’s facebook feed is more interesting than your flappy bird clone!

Avoid “infinite” type of games.

When you create a game that never ends you give your player a reason not to play it. The reason we have games is because we want to start something, get challenged and finish. There has to be a clear way to end the game, otherwise the player will think “ah, I can stop playing now, this never ends anyway”

Don’t release clones

Just don’t! Use your imagination and create something new, don’t re-invent something that’s already invented.

Creating a successful game is a hard task, but by following the above steps you can at least eliminate or minimize the chances that your game will directly compete with established websites.

Thanks for reading!

Facebooktwittergoogle_plusredditpinterestlinkedin
What is a full stack developer? (and where do they fit)

What is a full stack developer? (and where do they fit)

To begin the understanding of what a full stack developer is, let us first step back and define what the opposite is. Someone who is not a full stack developer, is then, a specialist in a particular area. The specialists are, in general, categorized based on work areas which are familiar to everybody. The categorization usually starts at “front end” and “back end”.  This is by default misleading, because even if you have a the “front end” and the “back end”, you are still missing 3 core components from the equation: database, deployment and devops.

Let’s look at the scenario from another angle. You are building a web app. A web app has the following basic criteria, which makes it a web app:

  1. It’s accessed through a web browser, by going to a URL.
  2. It has front end presentation – this is what the user sees – the buttons, text and input fields.
  3. The user creates, retrieves, modifies or saves data, so it must need:
  4. A web application server to handle the connections.
  5. A database to store all the information.
  6. The server needs a physical space to exist, so you deploy it to the cloud (see what I did there?).
  7. It needs to run, be stable, be updated.
  8. The stake holders need to understand its value.

Each of these points can be further broken up into more steps, depending on how complex the system is or how fast it needs to get developed. So here are the general skills necessary for each of the above points:

1. Web URL

This one is easy – register a domain and map it to your hosting plan. So far so good.

2. Front-end

Although self explanatory, there are a lot of details to this point. To develop a beautiful front end, you must know about UX (User Experience), UI (user interface), user flow, user stories, SEO, graphics, some basic color theory, latest trends in design, design patterns for the programming part, UI testing, A/B testing, responsiveness to mobile devices (and probably more). And for most of these points, there are hundreds of different ways to achieve the same thing. Notice how I did not mention any actual programming skills; that is because I believe the programming languages/technologies can be picked up easily, it’s the concepts that are harder to master.

3 and 4. Web Application Server

This is the other major known part of an application. The developer must know best practices for server applications. How is the communication handled? Is it secure? Is it encrypted? Is it as safe as possible from attacks? If the application supports real time messaging, how is it handled? What kind of design pattern should be used and how will the app architecture look like including load balancers, firewalls and databases? What happens if a node goes down? What happens if the connection is lost half way in a transaction? These are only some of the questions to be asked when developing the Web Application Server side of things

5. A database

This is yet another big chunk of the system. Which type of database to use? And why? When considering this, a lot of factors must be taken into account, including cost, performance, future expansions and so on. The developer must be at least familiar with the difference between relational and non-relational databases, store procedures and db locks.

6. Hosting

This is another skill our full stack developer needs to have. In very large projects, this is usually handled by a completely different team, but in today’s world, the full stack developer needs to know how to set up servers in the cloud or in house such that the application will run smoothly.

7. Deploying, Testing, Availability

Other key role in the lifecycle of an application are deployment, continous testing and availability. This require skills such as creating VMs or Doker containers, testing frameworks for continous integration and knowledge about distributed systems and availability. Another criteria which falls under this category is data consistency. I watched a speech about availability vs consistency of data, and in the speech there was an example about hotel booking systems and how in their business model availability trumps data consistency. For example, they allow the possibility of 2 people booking the same hotel room at the same time at the cost of the service being available. This is due to their business model – they’d rather overbook the hotel and deal with this at the counter (they all have a few rooms always available for these scenarios) than have you book a room in another hotel.

8. Relaying value to the stake holders

This, to me, is by far the most important skill to have. For everything I wrote above there are books. Hundreds of books, forums, stack exchange answers, Quora questions, university classes and so on. But for explaining the value to a business owner, for that there are no books. It’s all about the experience. And the only way to gather experience is by doing. And the best way to gather experience on this subject is to create, from scratch, your own social network application. This is the real “hello world” application.

So that’s what a full stack developer should do. But specialization has their own merit and it exists for a reason, so where do they [full stack developers] fit?

The most common answer is: start-ups!  This is true for multiple reasons. A full stack developer is a very good asset in a startup – given the skills above. They can pretty much create a system from scratch, get it up and running and maintain it until it takes off.

And you don’t need to be a database expert to do this (and you shouldn’t). It is pretty self explanatory that you shouldn’t use an Oracle set up for your database before you have a prototype to your product. And if the prototype can be done using a free open source db (such as MongoDB) then just do it!

There is however, another place where full stack developers will be used a lot in the future: in big corporations, especially in traditional ones such as banking and finance. More on this another time 🙂

So in other words, a full stack developer should be able to put together a social network type of site (in terms of complexity), including mockups, layout, choosing color schemes, do all the development up to a working beta, and explain to the stakeholders, in plain english, the advantages of using the technologies of choice.

I learn by reading and having conversations with people about different subjects. This is a hot topic in the tech world right now and I would like to get your opinion on this so don’t hesitate to comment!

 

Facebooktwittergoogle_plusredditpinterestlinkedin
How to jump from ActionScript to Javascript / HTML5

How to jump from ActionScript to Javascript / HTML5

When I started thinking about this subject I thought maybe it was just me, in my particular situation and work experience, who got left behind web technologies.  But after conversations with many senior developers, I concluded this is a pretty common theme among us and a problem worth tackling.

The purpose of this article is to shed some light onto web technologies from a principles point of view.  This is targeted to senior developers who have experience in more formal languages such as as3, C++, Java, Assembly(!!).  It is also targeted for CTOs, Business Managers, Project Managers and any other decision making personnel who is having a tough time with the terminology.  Since I’ve been coding mostly in ActionScript for the past years, I will use it as a reference in this article, but the general concepts apply to other programming languages as well. And although there are many technology stacks used today to create web applications, I will focus on JavaScript related ones because those are the ones I am currently learning. Of course, the concepts can be extrapolated to other technologies (such as PHP, .NET, Ruby, etc). Please be aware, this is not a technical article. You will not learn how to migrate your code from as3 to JavaScript. This is one level of abstraction higher

When someone is looking to start working on a web-app, they will quickly be bombarded with the following terminology: JavaScript, HTML, css, css3, DOM, jQuery, Ember, Angular, Angular2, React, Node, MEAN Stack, Full-Stack, MongoDB, Bootstrap, Responsive, Mobile-Ready, ES6, ES7, TypeScript, Redux, DevOps, JSON, XML, Webpack, Stringify.  Enough terminology to fill out a resume! Someone who wrote physics engines for AAA games might get completely overwhelmed by this.

But don’t be afraid, you are not alone, and it’s perfectly normal to be able to write a full blow car physics algorithm and not to have a clue how to write a “hello world” web page.  For those who started the proper way (from basic HTML to older AJAX techniques and then dived into exotic new frameworks such as AngularJS), I ask you this: Imagine learning Angular without knowing what a <div> is.  How would you feel?

The reverse is also true: imagine doing a physics engine in C++ without understanding pointers and recursion.

Before we move forward into web application structure, let’s point out one of the biggest differences: there’s no compile!

We are used to the following flow:

  1. Write Code
  2. Compile
  3. Run
  4. Debug

With web apps, you simply write code, then you refresh the webpage. The latter step being sometimes a combination of running and debugging. And depending on which technologies you use, the refreshing is also optional.  So you end up writing code and seeing the changes live.  How cool is that?

So here is a list of important key concepts which helped me jump ship from as3 to web apps:

1. You are building HTML.  Always!

This is one thing which, although it seems extremely trivial now, it wasn’t easy to grasp in the beginning.  When using ANY web technologies  your end result is HTML.  Everything you do involves creating, manipulating and styling HTML components, also called DOM nodes.

You might be somewhat familiar with <head>, <body> of an html site, but the building blocks of the layout are really divs, tables, lists, buttons and input fields.

There is a ton of documentation on the ins and outs of this, but the basic principle is this: your end result is a web page, made up of HTML tags. You simply use Javascript and other frameworks to manipulate those tags.  That’s all.

2. JavaScript is your best friend

So you are building HTML and you need something to manipulate it with – enter JavaScript.  If you come from a more traditional language such as C++, you will probably feel like puking at this thought.  But have no fear, it’s just how things work. (Why C++ developers should not be scared of JavaScript)

JavaScript is a lot more powerful than people give it credit.  JavaScript can be Procedural, Structured, Object-Oriented, Functional, Event-Driven and Interpreted. It all depends on how you use it.  Also, passing functions as arguments is an awesome way to do some really crazy things! Also, JavaScript is fast!

3. Goolge Chrome is your other best friend

One of the most difficult things to wrap your head around web application development is the dev environment.  You might be used to Eclipse, Flash Builder, Visual Studio – and all of the sudden all the examples you see are done in Notepad++ at best, no compile, and just browser refresh.

This will take some getting used to, so I highly recommend trying out different setups.  The two most common editors are Sublime Text and Webstorm.  Bonus points if you write a full stack app using vi only 🙂

I also recommend getting very familiar with Google Chrome’s developer tools, as they will provide tremendous help when developing and debugging.

4. Social Network is the new “Hello World” app.

It is widely acceptable to jump into a new programming language or technology by writing a “hello world” program.  This is not good enough anymore.  The new “hello world” should be a fully functional social network (including deployment to a cloud based service Amazon Web Services or MS Azure).  I did mine in 30 hours, so if you skip on endless Facebook scrolling, you can do too during a long weekend!

The social network should have at a minimum the following:

Stage 1:

  • Landing page for sign-in or sign up
  • Create/Edit profile
  • Make friends

Stage 2:

  • live, real time encrypted chat module

Stage 3:

  • Native iPhone, Android and Windows Mobile apps.

Stage 4:

  • backoffice / admin tool for the social network.
    • This tool should have the capability to see stats of the system, ban users, send mass messages, remove accounts, etc.

Although you are not expected to be a designer, the app should not look like it was put together by a developer.  There are many  styles of UI components which look very nice and could be used. If you are a developer, it doesn’t mean you can’t create good looking apps without the input of a designer.

Creating and deploying a Social Network app will make you understand all aspects of the technologies used.  And although you will not become a database guru, you will at least have an idea of what it means to persist data to a database and how to retrieve it and what technologies to use.

I always believed that great products are built by great teams, not by great skills.  Anybody has the ability to improve their technical skills and there will ALWAYS be a better solution and room for improvement.  What differentiates good products from mediocre ones is how well the team works together.  A team of average coders that get along very well will put together a much better product than a team of elite coders that don’t get along.

5. Choosing the right technologies – chose all!

One of the most daunting tasks for a CTO or software developer when starting a new project is to chose which web technology to use.  There are so many!  And so many combinations!  The best way to decide is to create a series of small pet projects and use different technologies for different ones.

For example, we can take our social network example and first build the backend in Node.js and then build the same functionality in Ruby.  This would be an excellent exercise to compare multiple technologies.  You can then dump the code in github and show to potential employers that you wrote open source software 🙂

6. Understanding the lingo

Above, I listed most of the key words which are currently hot in the web development world.  I will explain to them in simple, plain english, so that you understand how they all fit together:

JavaScript, HTML, css, css3, DOM, jQuery, Ember, Angular, Angular2, React, Node, MongoDB, MEAN Stack, Full-Stack, MongoDB, Bootstrap, Responsive, Mobile-Ready, ES6, ES7, TypeScript, Redux, DevOps, JSON, XML, Webpack, Stringif

You are building web applications.  The end result is HTML.  You use the JavaScript to manipulate the DOM (HTML) and to write your business logic.  The application can be broken down into 2 distinct areas: the UI and the logic.

The UI is how the app looks – colors, styles, fonts and animations.  These are controled by css (css3) bootstrap and jQuery.

The logic is written in JavaScript, but it can’t all be dumped in one file.  So we use frameworks.  Frameworks include: Angular/Angular2, React/Redux. Ember.

7. Bring value to the customer!

The most important lesson is by far bringing value to the customer.  This goes beyond programming and software engineering.  This is the thing that should pop in everyone’s head when thinking about a new product.  Why are we migrating from Flex to html5? or Why are so many companies re-writing their software? Because the end-user requirements change constantly.

When making the decision of which framework to use, besides the technical details or requirements, a CTO should also keep in mind the available work force for hire. At the time I’m writing this article, React / Redux is a very cool and funky new framework for developing web apps created and backed by Facebook, but it would be a pretty dumb idea to create a product using it if you expect to hire 10 more programmers next year.  The reason is you won’t have anybody to choose from!

Another value you can bring to the customer using web technologies is the long term maintainability of the code.  Since all these technologies work interchangeably with one another, it is very important to ask the following questions:

  1. How easy is it to re-write part of the app in the future? (the UI, the back-end, the database)
  2. Can I easily find programmers to maintain my code in 2 years from now?

 

Conclusions

I hope I shined some light on some of the questions regarding HTML5 migration and web applications in general. As you can see, switching from classic application development to web applications goes way beyond learning JavaScript and HTML. Those are just simple, implementation details which can be picked up in a few weeks by a seasoned developer. The real value is understanding well the above points, and I hope this article will open many doors to many developers which are in doubt about jumping ship to web application development.

Facebooktwittergoogle_plusredditpinterestlinkedin