Monday, 15 December 2014

Introducing Docker to a Java developer

Introducing Docker to a Java developer


Docker containers
You might have noticed we are currently experiencing a Docker frenzy. Every day there is a new framework or service popping up that is based on Docker. A lot of people have been asking what this Docker thing is all about. I’m going to try to explain what Docker is and see how it it fits into a Java developers ecosystem.

What is Docker

Docker is an open platform for developers and sysadmins to build, ship, and run applications. It basically allows you to create a container for your service with all its required components. Every application needs quite a few things to run correctly, which can all vary from one system to another, just think about it: the Operating System and related libraries, JDK 1.x, application server and so on.
If you have ever promoted an application between different development, testing and production environments, you know it is very hard to make sure that all environments are exactly a like and don’t have different versions of all your needed dependencies. This is an issue that will be resolved when using Docker. You get an very easy way to put all these dependencies into a container and shipping it between environments as a package. These different environments could be a developers laptop up to a production server.
To improve the quality of your release process, you should only be building your application once and passing the result binary of that build process to each of your environments instead of rebuild it each time for each specific environment. This is one of the important treats of a successful Continuous Delivery process. Now we want to take it one step further, instead of building your application once, we’ll take your application together with its required building blocks and build that once into a so called Docker container. You don’t have to worry if patch x.y of the OS is installed or patch Z of the application server is already installed on the test environment or the production environment. These patches would be put into your packaged together into your container, so each environment that is running the latest version of your container would in fact have the necessary patches. Every environment comes closed to being identical to each other.

Docker vs Virtual Machines

Now you might think, wait a minute we can already do this with Virtual Machines, and you’re right. Yet Docker takes containerization to the next level. Instead of virtualising the entire environment and running a hypervisor, a guest operating system and so on which take a lot of resources, Docker uses your system resources and operating system directly which minimizes the overhead.
Containers vs Virtual Machines
Minimizing the overhead with Containers
If you are an experienced unix veteran, you might know the pieces that Docker is using under the hood. Docker is using namespaces to create an isolated workspace for each container. Containers are constraint to its host systems resources by using cgroups. This makes it easy to share resources with several containers but also make sure limits can be imposed to a specific container. Union file system is used to create to build several layers on top of each other so layers can be reused by other containers which saves a lot of disk space. All these technologies aren’t particularly new, but Docker does a great job of combining them all and giving the user a clean interface on top of it.

Docker Hub and the community

The Docker Hub is an amazing registry where you can store and find public images of all sorts of services and applications. You can compare this GitHub, where people can make and share their source code. In this case, the Docker Hub lets you make and share Docker images in a very user friendly way. When you’ve build a Docker image, you can push it to the Docker Hub and other people can download it to get started with it.
There currently are already more than 45.000 public images in the registry, so almost any application you can think of will probably be already be in there for your to (re)use if wanted. There are also a lot of official images, these are images which are verified by Docker, like for CentOS, Debian, MySQL, Java, Jenkins and so on.
You can also upload private images to the Docker Hub, you can get one private repository and if you want more you’ll have to pay. If you decide to use Docker, you should really think about hosting your own Docker registry. This is a trivial task since you can download and run a Docker Registry as… a docker image!

How do I get started

First you’ll have to install Docker. Docker currently only works directly on Linux systems, but for Windows and OSX users there is a wrapper boot2docker that installs a mini Linux Virtual Machine which doesn’t give too much overhead.

Building your own Docker image

Now you’ve seen how to get images from the Docker Hub, what about if you want to build your own image. Everything starts with a Dockerfile, a simple text based file you will create which describe what you want your environment will look like. Let’s take the Linkshortener REST API we build last time, which was a executable jar file that launches its own Tomcat server and put it inside a Docker container.
To get started by adding a file called Dockerfile into the root of our maven project. This will be the only file we need to maintain to instruct Docker how to build and run our application. This file will contain a set of simple commands to construct an environment with our application.
I have chosen to base my image on the public dockerfile/java which has several versions, called tags, available. The tag we will be using has the Oracle JDK 8 installed in a Ubuntu environment. This is done by using the the FROM keyword and refering to the Docker image name:tag we want to use. The tag version is optional, but if you don’t specify it will just take the latest available version which can lead to an unreproducible build.
Dockerfile
FROM dockerfile/java:oracle-java8
 
MAINTAINER  Driss Amri
 
ADD target/linkshortener-1.0.0-SNAPSHOT.jar /app/linkshortener.jar
 
CMD ["java", "-jar", "/app/linkshortener.jar"]
This Dockerfile does not contain much logic, since setting up the environment is already done in the image we are building upon. The only thing we are doing is added our linkshortener-1.0.0-SNAPSHOT.jar from our host machine, which is created by running a maven build (mvn package), and copy it to inside our Docker environment. This is done by using the ADD keyword.
The final part is defining the command that has to be executed when we run this image. We can do this by using the CMD keyword, which can be defined as an array. The first parameter is the program we want to executed, followed by all the arguments we want to pass to it.
There is also an entry MAINTAINER to define some metadata about the docker file, about who is the maintaining the file, this is completely optional of course.
This is all we need to do to define the container for our application. From this Dockerfile we have to build an actual Docker image that can be run and transferred between our different environments (development, test, production). This is done by executing the following command:
docker build -t drissamri/linkshortener:1.0 .
We are telling docker we want to build an image called drissamri/linkshortener, which is the recommended approach of naming your Docker container. We are setting a prefix which can refer to a company or user name and then giving a name for the actual application. We are giving a specific tag name to this build, which is version 1.0. As a last step, we are telling Docker where it can find its Dockerfile by passing it the current directory using the . notation.
When you are executing this command for the first time, it will take some time since it has to build all layers defined in the Dockerfile, but also the ones we are building upon by basing it on the dockerfile/java:oracle-java8 Docker image. Next time we execute this command, it will be much faster since it is caching all its intermediate layers and only rebuilding the ones that actually changed since the last build.
bash-3.2$ docker build -t drissamri/linkshortener:1.0 .
Sending build context to Docker daemon 27.66 MB
Sending build context to Docker daemon
Step 0 : FROM dockerfile/java:oracle-java8
 ---> 3cd60ec40fa7
Step 1 : MAINTAINER Driss Amri
 ---> Using cache
 ---> f5b8523f06af
Step 2 : ADD target/linkshortener-1.0.0-SNAPSHOT.jar /app/linkshortener.jar
 ---> Using cache
 ---> ce29c01e1764
Step 3 : CMD java -jar /app/linkshortener.jar
 ---> Using cache
 ---> 9298fee10e4e
Successfully built 9298fee10e4e
Once this is done, we have a local Docker image with the specified name. We could upload this image to the Docker Hub or another Docker repository to share it with other people. We won’t do that today, but it’s nice to know that this process is very easy. Now we have our container, let’s actually start up the web application.
docker run -p 8080:8080 drissamri/linkshortener:1.0
This is all you have to to start up your own container and expose port 8080 from the docker container and map it to port 8080 of your host. If you are running Docker on Linux you can access the application http://localhost:8080/links. If you are using boot2docker you’ll have to check what IP it is using, you can find it out by running boot2docker ip . In my case I’m able to access the application by going to http://192.168.59.103:8080/links.
This is one way to get your application up and running inside a Docker container.

Continuous Delivery

If you are already doing Continuous Integration, you could easily plug Docker in to that process. Your Jenkins, Bamboo or whatever you are using is building an executable .jar or .war file. The next step would be to build a Docker image based on your application deployable. When you’ve created the Docker image you could then upload this to the Docker Hub or your private Docker repository. Its good to know that Artifactory already supports storing Docker images.
Your deployment plans for each environments can simply download the Docker image and transfer it to the target environment and start the image. The environment specific configuration like database URL and credentials could be passed a startup arguments.

Conclusion

This post was a simple introduction to Docker and to show you how you can run Java application into a Docker image. In this example I’m using Spring Boot and an executable jar file, but if you are using an application server not much changes, only will need base your Dockerfile on another image that already has your server installed or you would need to set it up yourself, which is not a hard thing to do. In future posts I’ll expand more on Docker use and also on cloud deployment options, like deploying your containers to IBM BlueMix.
I hope this has shed a light on the whole Docker hype since it doesn’t look like its going away any time soon.
You can find the source for the Linkshortener application and the Dockerfile on GitHub

Wednesday, 10 December 2014

20 Toughest Job Interview Questions Asked This Year

There's nothing worse than being caught off guard during a job interview.

You can experience the strangest possible interview questions of the last year - all from the safety of your chair.This year's weirdest questions come courtesy of Apple, Twitter, Goldman Sachs, Google, Amazon, and a few others.

Trust us, none of these questions would be a breeze to answer.

1.Job: Google Administrative Assistant
 
Question: If you were given a box of pencils, list 10 things you could do with them that are not their traditional use.

2.Job: Senior Recruiting Manager at Amazon
 
Question: How would you solve problems if you were from Mars?

3.Job: Apple Intern
 
Question: What's the most creative way you can break a clock?

4.Job: Sales Associate at Pacific Sunwear
 
Question: If you were a street sign, what would you be?

5.Job: Software Development Engineer at Microsoft
 
Question: A disc is spinning on a spindle, and you don't know which way. You are given a set of pins. Describe how you would use them to determine which way the disc is spinning.

6.Job: Technology Analyst at Goldman Sachs
 
Question: There are infinite black and white dots on a plane. Prove that the distance between one black dot and one white dot is one unit.

7.Job: Business Operations Intern at Facebook 
 
Question: You have a bag of with 'N' number of strings. At random, you pull out a string's end.You pull out another string end and you tie the two together. You repeat this until there are no loose ends left to pull out of the bag. 

What is the expected number of loops?

8.Job: Summer Marketing Analyst at JP Morgan Chase
 
Question: Think of a product or service that no one has ever thought of before, one that you think would be revolutionary for your university. How would you market it?

You want to design a phone for deaf people — how do you do it?

9.Job: Recruiter at Twitter
 
Question: Why should we not hire you?

10. Job: Product manager at Google
 
Question: You want to design a phone for deaf people รข how do you do it?

11.Job: Intern at Microsoft
 
Question: How would you design an elevator?

12.Job: QA Automation Engineer at BitTorrent
 
Question: A dwarf-killing giant lines up 10 dwarfs from shortest to tallest.Each dwarf can see all the shortest dwarfs in front of him, but cannot see the dwarfs behind himself. 

The giant randomly puts a white or black hat on each dwarf. No dwarf can see their own hat. The giant tells all the dwarfs that he will ask each dwarf, starting with the tallest, for the color of his hat. 

If the dwarf answers incorrectly, the giant will kill the dwarf. Each dwarf can hear the previous answers, but cannot hear when a dwarf is killed. The dwarves are given an opportunity to collude before the hats are distributed. 

What strategy should be used to kill the fewest dwarfs, and what is the minimum number of dwarfs that can be saved with this strategy?

13.Job: Associate Consultant at Microsoft
 
Question: Name as many Microsoft products as you can.

14.Job: Senior Software Engineer at Twitter
 
Question: Is this binary tree a mirror of itself?

15.Job: Investment Intern at AIG
 
Question: How do you cut a circular cake into eight equal pieces?

16.Job: Operations Analyst at Goldman Sachs
 
Question: How much does a Boeing 707 weigh?

17.Job: Engineering Technician at Tesla Motors
 
Question: How would you describe a dynamometer to an 8-year-old child?

18.Job: Merchandiser at PepsiCo
 
Question: Do you believe in a higher power?

19.Job: Senior Software Engineer at Electronic Arts
 
Question: How do you compute the collision of two moving spheres? 

Give me both the mathematical equations for the solution as well as an algorithmic implementation.

20.Job: Product Tester at MTD Products
 
Question: How do you feel about working in extreme weather conditions all year round?

Monday, 8 December 2014

The Best Programming Languages Every Beginner Should Learn

Computer science is a booming industry in the US - and it pays extremely well. There's always demand for sharp, talented engineers, which is why learning how to code can seem like an attractive option.

But, as is the case with any new skill, it can be difficult to know where to start. Here are a few steps you should take early on and programming languages that are best-suited for beginners.

Before you learn a language, start with 'drag and drop' programming.

"Drag and drop" programming is a basic technique that allows you to build code by dragging and dropping blocks or some other visual cue rather than manually writing text-based code.
It makes it easy to understand the basics of programming without getting caught up in meticulous character placement, according to Hadi Partovi, co-founder of a website that offers online coding courses called Code.org.
"Once you've learned the basic concepts using drag and drop, you'll immediately want to learn [how to] do the real thing," Partovi said to Business Insider.
There are plenty of programs out there that can help you get started with drag and drop programming, including MIT Scratch and Code.org's Code Studio, and Google Blocky.

Python is one of the easiest languages to start with.

Python is an easy language for beginners, according to Partovi, because there's less of an emphasis on syntax. So, if you forget your parentheses or misplace a few semicolons, it shouldn't trip you up as much as it might if you were coding in a different language.

But Javascript is one of the most useful languages to know as a developer.

Javascript isn't as easy as Python, but it runs on every single platform out there - Mac, Windows, iOS, and Android among others. Every single Web browser, and even new types of devices like smartwatches use Javascript at some capacity, Partovi said.
"Once you reach that level of critical mass, it's not going away," Partovi said.

Once you have the hang of Javascript, try playing with Ruby and Ruby on Rails.

Ruby on Rails is a great tool that can help you with the backend aspect of your programming. Although Ruby and Ruby on Rails have similar names, there's actually an important difference. Ruby is a scripting language, just like Python, but Ruby on Rails is a Web app framework built on Ruby. In other words, Ruby is the language, while Ruby on Rails is a tool that makes it easy to use the Ruby language to build websites.
What makes Ruby and Ruby on Rails so attractive, according to Partovi, is that there's very little prototyping involved. This means that once you have the code written, it's pretty easy to get the final product up and running.

BONUS: Get familiar with HTML...you're going to need it if you want to build a website.


While HTML isn't a programming language in the sense that Python, Ruby, and Javascript are, you still need it to build a website. HTML is used to describe how your website looks, while other languages like Javascript power the interactive components, such as what happens when you clock a button on the site. 

Thursday, 4 December 2014

Developers, designers and data: The hottest tech jobs of 2015

If you added 'find a new job' to your list of New Year's resolutions, we're here to help. We talked hiring trends with Scott Dobroski, a career trends analyst at Glassdoor to help identify the hottest jobs in tech.
We looked at data provided by the site, which aggregates reviews of jobs and companies, that ranks tech jobs according to how many employees thought business was improving in 2014 to explore which could be next year's best bets. According to Dobroski, big data, mobile and privacy are going to be "very hot and very popular" in 2015.

Data science is hot because it spans industries. "What data scientists really love about their jobs right now is that they get to build a roadmap within their organizations," and answer questions that have never been asked before, Dobroski says.
Privacy breaches at companies like AT&T, Michaels and Home Depot rattled consumers in 2014. With customer confidence of premium value to big companies in an insecure online world, hiring privacy experts could be a wise investment.
Mobile usage soared in 2014. CNN reported in February that for the first time, more people were accessing the Internet on their smartphones than on their computers and companies will likely be looking to hire talent to meet that demand.
The mobile trend extends to the job hunting process. Dobroski says nine out of 10 jobseekers are looking for positions on their mobile devices, a 7% growth from last year. More than half of those job candidates say it's difficult to apply over mobile. By optimizing their application process for mobile, companies can reach more applicants.
The past year also saw a renewed focus on workplace diversity in tech. Twitter, Google, Apple, LinkedIn and Facebook released their demographic data, which mostly showed an overwhelmingly white and male workforce.
So it's no surprise that Dobroski says hiring with diversity in mind will be another big trend in 2015. He predicts that companies' demographic data could be a lot more balanced by the end of the year.
Check out our gallery, below, of the jobs in which people express the most optimism about their future. If you're inspired, then take a look at the digital and tech jobs for hire on the Mashable Job Board. Happy hunting.

Wednesday, 3 December 2014

5 Incredible Features in the Visual Studio 2015 Preview

The Visual Studio 2015 Preview included many new features that enhanced the way developers work with everything from the web and desktop to mobile apps. Several features have had the spotlight, such as gesture support in the editor, Cordova tooling, C++ enhancements and the new Android emulator. But there are several other, less talked about features that I feel every developer that uses Visual Studio 2015 will benefit from. With that said, lets jump straight in!

1. Custom Windows Layouts

This feature comes in handy if you develop on multiple devices. Say for example that you use a Surface Pro to develop on your train ride home and a 23″ monitor during the day. You can quickly switch between devices by going to Window -> Apply Window Layout and selecting one that you created earlier. They also have support for keyboard shortcuts so that you can quickly navigate to your favorite layout and the profile roams with you as long as you are signed into Visual Studio 2015.
Below is an example of switching between my Surface device and my Desktop Monitor. You will notice that with the Surface, I want to only show the XAML file whereas, with my large monitor, I want to see everything.
windowswitch

2. Better Code Editor

The code editor has been replaced with “Roslyn” to give you a new and improved code editing experience. Light bulbs are shown when you need to include fixes to your code or refactor it. Whenever you see a light bulb appear, then click it and it will give you suggestions based upon the code it has analyzed.
In this sample, it has determined that we included unnecessary “using” statements and helps remove them. Before doing so, you can generate a preview and have the changes affect the whole document, project or solution. While these features have appeared in JustCode and earlier versions of Visual Studio for years, we will be releasing a new version of JustCode for Visual Studio 2015 that will take advantage of Rosyln for enhanced productivity tools.
lightbulb

3. Shared Project – “All the Things!”

How many times have you wanted to use a Shared Project outside of a Windows Universal App? Now you can! After you open Visual Studio 2015 and search for “shared” then you will see the following:
sharedproject
Go ahead and select the Visual C# Shared Project and create a class named Person.cs and add the following code:
class Person
{
    public string FirstName { get; set; }
    public Person()
    {
        FirstName = "Michael";
    }
}
Create a new Console application and reference the Shared Project that we just created. Now you can write code such as :
var person = new Person();
Console.WriteLine(person.FirstName);
Console.ReadLine();
If you run the console app, you will see it retrieved the FirstName from our Shared Project. Go ahead and add a WPF or Windows Form application and access the Person class like you normally would. This also works for class libraries as well. After I’ve added several projects, my solution explorer looks like the following:
multipleproj
Notice that the only thing I had to do was reference the Shared Project.

4. IntelliSense for Bower and NPM

If you create a new ASP.NET 5 Web Project, you will notice several things that the new project template loads as shown below.
IntelliSense for Bower and NPM
Besides a updated file structure, you now have a folder called Dependencies that contains Bower and NPM. Generally speaking, you can think of Bower for client-side packages (such as jQuery and Angular) and NPM for developer tools (such as Grunt and Gulp). Both of these package managers are controlled by JSON files found in the solution.
  • bower.json for Bower
  • config.json for NPM
If we wanted to add a library using Bower, we would simply open the bower.json file and add the package that we want. In this case, I want to add the latest version of Angular without having to go to the Angular site and manually download it and add it to my project.
DataBinding for XAML
Once added, you will see that we have the option to install/update or delete the package or view the homepage from the drop-down menu. This will come in handy as you are working with web projects.

5. Debug Lambdas

Yes, the time has finally come where we can debug lambda expressions. Let’s take a look at the following code:
List<int> elements = new List<int>() { 10, 20, 31, 40 };
// ... Find index of first odd element.
int oddIndex = elements.FindIndex(x => x % 2 != 0);
Console.WriteLine(oddIndex);
The console will return the value of 2. But what if we wanted to add a watch and perform additional analysis of the expression as shown below.
DataBinding for XAML
In this sample, we added a watch on the breakpoint and added the following code:
elements.Where(v => (int)v > 11).ToArray()
As expected, it returned 3 items that were greater than 11. This will be a lot of help as you can use this in the immediate, and other debugger windows as well. It is also supported in both C# and Visual Basic.

BONUS TIP!!! Blend for Visual Studio 2015 Actually Rocks

Blend comes with several enhancements but, by far, the one that was needed the most is the overhaul of the UI as shown below. You will quickly find that Blend includes most of the functionality that we have grown to love in Visual Studio.
Blend for Visual Studio 2015
Some of the notible features are :
  • Basic Debugging Support
  • Peek in XAML
  • Custom Windows Layouts as shown in feature #1
  • Source Control
  • NuGet
  • and finally…
XAML IntelliSense!
Blend for Visual Studio 2015
Just after a few minutes of playing with the new Blend, I can tell Microsoft is committed to making the Blend experience similar to the Visual Studio one.

Tuesday, 2 December 2014

12 Things Best Employees Do Before Noon

In order to be a top notch employee, there are some habits you should adopt before you have your midday break. Here are the tasks high-functioning, productive, and more awake employees have completed before lunch:

1. THEY MAKE A WORK TO-DO LIST THE DAY BEFORE.

Many swear by having a written to-do list, and most make that to-do schedule the night before.

2. THEY GET A FULL NIGHT’S REST.

Lack of sleep affects your concentration level. Most health experts advise getting a minimum eight hours of shut-eye each night. Whatever your gold standard is for a “good night’s rest,” strive to meet it every work night.

3. THEY AVOID HITTING SNOOZE.

According to the report, “Anyone can make morning their most productive time. It could be that for the entire week, you set your alarm clock a little bit earlier, and you get out of bed on the first alarm. It may be a pain at first, but eventually you’ll get to the point where you’re getting your seven to eight hours of sleep at night, you’re waking up with all your energy, and accomplishing the things around the house you need to before going to the office.”

4. THEY EXERCISE.

Employees who’ve exercised before work or during the work day have better time-management skills, an improved mental sharpness, and are more patient with their peers.”

5. THEY PRACTICE A MORNING RITUAL.

Adopt a morning ritual. Whether you opt to meditate, read the newspaper, or surf the Web, it’s important to have that solo quiet time.

6. THEY EAT BREAKFAST.

Food provides the fuel you’ll need to concentrate, and breakfast is particularly important since it recharges you after you’ve fasted all night.

7. THEY ARRIVE AT THE OFFICE ON TIME.

Allot a safe amount of time to make it to work on schedule.

8. THEY CHECK IN WITH THEIR BOSS AND/OR EMPLOYEES.

Good workers set priorities that align with their company’s goals, and they’re transparent about their progress.

9. THEY TACKLE THE BIG PROJECTS FIRST.

You can dive right into work upon arriving in the office, since you made your to-do list the night before.

10. THEY AVOID MORNING MEETINGS.

If you have any say on meeting times, schedule them in the afternoon. The exception to this is if your meeting is the most important task of the day.

11. THEY ALLOT TIME FOR FOLLOWING UP ON MESSAGES.

Set a schedule to check and respond to email in increments.

12. THEY TAKE A MID-MORNING BREAK.

Get up and stretch your legs. Or stay seated and indulge in a little Internet surfing. According to the research:

“It’s actually good to zone out on Facebook and Twitter or send a personal text message or two. You should take 10-minute breaks occasionally. Companies that ban any kind of Facebook, texting, or personal calls can find it will be detrimental. Those practices increase employee satisfaction.”

Monday, 1 December 2014

25 Websites That Will Make You Smarter

Rather than waste your life on Facebook and Instagram, put your daily interneting to good use.
 
Here's a list of websites that will actually make you smarter:

1. CodeAcademy
Learn programming languages like HTML, CSS, and Javascript with this free, interactive resource.

2. Coursera
With more than 800 free courses on topics that range from internet history to financial engineering, the education platform helps you deepen your knowledge across a range of subjects.

3. Digital Photography School
Read through this goldmine of articles to improve your photography skills; they're helpful even if you're a complete beginner. There's also an active forum where you can find a community of other photographers to connect with.

4. Duolingo
Sharpen your language skills with this fun, addictive game. It's a college-quality education without the price tag. If you're looking for more free language-learning materials, you can also try BBC Languages.

5. edX
From classes like The Science of Happiness to Responsible Innovation, edX offers tons of MOOCs from many of the world's top universities.

6. Factsie
Did you know the horned lizard can shoot blood out of its tear ducts? Keep clicking through this site to find unusual historical and scientific facts, along with links to sources. Another great site for fun facts is Today I Found Out.

7. Fast Company's 30-Second MBA
In short video clips from from accomplished corporate executives, you'll learn great business advice and life lessons, really fast.

8. Freerice
Expand your vocabulary while feeding the hungry. It's the best way to feel good about yourself and learn words you can use for the rest of your life.

9. Gibbon
This is the ultimate playlist for learning. Users collect articles and videos to help you learn things from iOS programming to effective storytelling.

10. Instructables
Through fun videos and simple instructions, you can learn how to make anything from a tennis ball launcher to a backyard fort. You can also submit your own creations and share what you make with the rest of the world. Still wanting to learn more? You can visit eHow and gain a wide range of skills, such as how to cook, decorate, fix, plan, garden, or even make a budget.

11. Investopedia
Learn everything you need to know about the world of investing, markets, and personal finance.

12. Khan Academy
Not only will you learn a wide variety of subjects through immensely helpful videos, but you'll get a chance to practice them and keep track of your learning statistics, too. It's a great way to further your understanding of subjects you've already taken or to learn something new.

13. LearnVest
The personal finance site offers news, classes, and resources to help you learn the basics of managing your money.

14. Lifehacker
On this highly useful site, you'll find an assortment of tips, tricks, and downloads for getting things done.

15. Lumosity
Train your brain with these fun, scientifically designed games. You can build your own Personalized Training Program to improve your memory and attention and track your progress.

16. MIT Open Courseware
Want to be as smart as an MIT student? Check out classes and course materials from the institute here.

17. Powersearching with Google
Learn how to find anything you ever wanted by mastering your Google search skills. Also, read this article on 100 Google tricks that will save you time in school.

18. Quora
Get your questions answered by other smart people, or read through the questions other people have asked. You can learn anything from productivity hacks to the best foods of all time.

19. Recipe Puppy
Enter in all the ingredients you can find in your kitchen, and this wonderful search engine will give you a list of all the recipes you can make with what you have. It's a great way to learn how to cook without the hassle of buying everything beforehand. For a more extensive list of recipes, try AllRecipes.

20. Spreeder
This free, online speed-reading software will improve your reading speed and comprehension. Just paste the text you'd like to read, and it'll take care of the rest.

21. StackOverflow
It's a question and answer site for programmers - basically a coder's best friend. Other great sources to learn code are Learn X in Y Minutes and W3Schools.

22. TED-Ed
This is a new initiative launched by TED with the idea of "lessons worth sharing." It is meant to spark the curiosity of learners around the world by creating a library of award-winning, animated lessons created by expert educators, screenwriters, and animators. You can create your own customized lesson to distribute around the world by adding questions, discussion topics, and other supplementary materials to any educational video on YouTube.

23. Udemy
Feed your brain with online courses on everything from web development to playing the guitar. You can also teach your own classes through the platform.

24. Unplug The TV
A fun website that suggests informative videos for you to watch instead of TV. Topics range from space mining to "How Containerization Shaped the Modern World."

25. VSauce
This Youtube Channel provides mind-blowing facts and the best of the internet, which will make you realize how amazing our world is. What would happen if the world stopped spinning? Why do we get bored? How many things are there? Watch the videos and find out.