Learn it fast with expert-taught software and skills training at lynda.com. See what you can learn

By Mark Niemann-Ross | Wednesday, August 20, 2014

Code Clinic: The Second Challenge

CodeClinic_Article_2

What is programming really like?

Code Clinic is a series of courses from lynda.com designed to help you understand the process of programming—something called “computational thinking.”

By Mark Niemann-Ross | Tuesday, July 15, 2014

Code Clinic: 6 Problems in 6 Programming Languages

CodeClinic

“Learn to code!” It’s the latest buzzphrase. Everyone from Barack Obama to Will.i.am is talking up the importance of learning a programming language—which is good. But it’s only part of the story.

Successful programmers know more than just a computer language. They also know how to think about solving problems. They use “computational thinking”: breaking a problem down into segments that lend themselves to computer solutions.

Our Developer content at lynda.com already provides a wealth of programming courses geared towards all levels of experience. Starting this month, we’ll also delve into computational thinking—with a unique new set of courses called Code Clinic.

By Mark Niemann-Ross | Wednesday, September 26, 2012

Green computing starts with your code

Is a paperless society really an energy savior?

Manufacturing office paper consumes more energy than producing food, and at nearly 8 percent of US energy going to paper, even more than steel. With these statistics in mind, it’s easy to believe a paperless society would conserve massive amounts of energy. Consider: An electronic memo doesn’t consume paper, doesn’t use ink, doesn’t require a printer spinning motors, and doesn’t require a delivery truck. Some bright folks calculated the savings for sending an electronic memo over paper is about .36 kilowatt-hours (kWh), or an energy-spend equivalent to microwaving three potatoes.

The Internet has a carbon footprint

But hold on a minute—that savings assumes an electronic memo uses no electricity, which is false. According to one estimate, moving one megabyte across the Internet costs .006 kWh, or the energy contained in one very small bite of a chocolate chip cookie.

We move a lot of kilowatts across the Internet. Different groups will provide different estimates, but Cisco estimates[CA3] traffic will pass the zettabyte threshold by 2017. No matter how you run the numbers, all those .006 kWh chocolate chip cookie–sized bytes of data have an impact. Google alone used 2,259,998 megawatt-hours (mWh) in 2010. When you’re consuming this statistic, keep in mind 1 mWh can sustain 1,000 homes for one hour. Another interesting tidbit: Google estimates an Internet search consumes one-third of a watt-hour or .0003 kWh (if you’re keeping track in cookie similes, this is about a cookie crumb).

Moving data isn’t the only thing computers do; they also store data. As an example, services such as Amazon EC2 charge by demand based on processor time, and a majority of that payment goes for electricity. According to the Northwest Power and Conservation Council, at this rate these server farms will account for about 10 percent of northwestern electricity by 2030. Code costs money to run. Inefficient code costs more money to run.

Your code is the solution

So why is the content manager for the Developer segment at lynda.com bringing this up? What does this have to do with programmers? Other than turning off lights and computers, what can we do?

Plenty. Our code drives the microprocessors that use all this power. Our code makes calls to APIs that spin up central processing units (CPUs) that create thermal load that require cooling that devour electricity.

Mobile devices bring this issue into sharp focus. Unnecessary code chews up precious battery life, reducing the time between recharges. Apple banned Adobe Flash from the iPhone because of excessive battery usage. Interestingly, this battery drain seems to be related to code, not hardware. Imagine the difference if Adobe had been able to reduce the power consumed by Flash with more efficient programming.

Tips for writing efficient code

Your office has power-saving features: lights controlled by timers, setback thermostats, and paper recycling. Why not write code with the same intent? Cache data from the server and reduce the number of queries. Optimize SQL calls to produce only the results you need. Once we start looking for ways to reduce load on the Internet, we’ll see many more options.

• Profile your code to reduce unnecessary cycles. In Drew Falkman‘s PHP 5.4 New Features course, profiling is discussed and examples are provided on how to write more efficient code. Take a look at the third movie in chapter one titled Using the High Precision Timer.

• Write closer to the CPU. Instead of writing a mobile web app, consider creating a native app using Objective-C, C#, or Java. Your application will run faster, and require fewer conversations across the Internet. For more guidance, consider checking out Objective-C Essential Training, C# Essential Training, and Java Essential Training.

• Write efficient HTML. Optimizing HTML pages not only improves the performance of your website, but will also reduce the number of hits on the server and the associated load. Look at Google Webmaster Tools, or check out Bill Weinman’s HTML5: Local Storage and Offline Applications in Depth to learn more about ways to store data locally, instead of on servers.

In closing, consider this: Programmers used to fret about available memory when 16 kilobytes of ram was a big deal, and they learned to be efficient. Over time, memory has become cheap and programs have become larger, but now we face an energy shortage. Why not start considering energy conservation to be the next big programming challenge?

Your thoughts?

By Mark Niemann-Ross | Wednesday, July 25, 2012

Tips for getting your kids interested in programming

It’s summer! It’s July! Your son or daughter has been decompressing from school for nearly a month, and now they’re bored, feisty, and looking for something new. Resourceful parents dig deep into their bag of tricks for something—anything—to keep the son/daughter from bugging their brother/sister. I, personally, like to think of this boredom as a window of opportunity to convert non-productive screen time into a learning experience, or, more specifically, a window of opportunity to spark an interest that may lead young minds toward wanting to know more about the skill of programming.

Young boy typing on keyboard with red computer.

Sure, in the big picture, summer is all about getting outside, playing ball at the park, swimming in the pool, and, more or less, finding new and inventive ways of getting into trouble. Don’t get me wrong—I’m not advocating taking up residence on the couch. What I am suggesting is that along with that physical activity, summer is also a great time to stretch minds.

Programming is a real-world tool that provides context for structured problem-solving, math concepts, and improved study habits. That being said, of course no red-blooded kid is going to willingly dive into something as “boring” as programming. Seriously—video games are a much more amusing way to consume screen time than staring at a bunch of cryptic incantations written in some useless programming language. Are you kidding? Learn programming? Learn ANYTHING? I know kids that would rather cut the lawn than get stuck behind a textbook.

If your kid is the “I’d rather mow the lawn” type, here’s a thought—tell your kid they could amuse and amaze their friends by building their own video game. It’s entirely possible that they may end up creating something like Angry Birds or Farmville.

Image of Angry Birds App in Facebook, used as an example of Facebook gamification.

While your son or daughter's first programming initiative may not be as exciting as Angry Birds, practice makes perfect and the creation of basic Facebook games is a great gateway into the world of programming.

Facebook is a great platform to introduce  programmingahem—writing games. Facebook programming can be done with JavaScript—an extremely useful language to know— and Facebook games can be created for free. Plus, Facebook is something “the kid” will already know about. You’ll just need to supply server access (something Ray Villalobos walks you through in Building Facebook Applications with HTML and JavaScript.)

How to get your kids started

Getting your kids started may end up being the hardest part of this initiative. You’ll need to use your parenting super-powers of persuasion to introduce the idea and fire up their enthusiasm. This should be far easier than convincing them to floss their teeth, but there may still be some resistance. Back in my parenting days, I found it easiest to have this sort of conversation over an ice-cream cone.

“Hey,” I would say, using my nonchalant voice. “I was just reading about Facebook games. Have you heard anything about them?”

My kids would respond positively. Possibly launch off into an enthusiastic dissertation about their latest engagement with cows, birds, or jewels.

“I heard it’s not too difficult to create them yourself,” I would say. “If you’re interested, I think I could dig up some instructions and you could build one. What kind of game would you build?”

…and we’re off to the races.

Of course, this means that you—the parent—also need to follow up and help them get un-stuck at times. I recommend sitting down with them to watch the introduction to Ray’s Building Facebook Applications with HTML and JavaScript course together. Maybe start by building your own game with them so that you develop some empathy. I’d also recommend that you let them build a game on their own, as it can be entirely too easy for a parent to take over the project, leaving the kid on the sidelines. There’s great benefit in letting them control their own destiny, and make their own mistakes. Besides, you’ll be amazed at how fast they pick this stuff up and learn things you probably overlooked.

What to expect, and why it’s ok if their first initiative isn’t epic

To be honest, the first game is going to be pretty simplistic and much less sophisticated than what a wild imagination might hope for. Remember to reassure your kids and remind them that it’s just their first game, and it doesn’t mean they won’t ever write the epic game they envision. To assist your son or daughter’s first attempt, you might want to use some of the sample JavaScript source code for games you’ll find by googling “simple javascript games.” If you use one of those programs, be sure to remember to credit the original author.

Once your son or daughter makes it over the hurdle of the first game, you’ll find their desire to learn more about JavaScript will naturally feed itself. To aid you in your next steps, the lynda.com training library has a slew of programming courses, ranging from fundamentals of programming all the way to five hours of in-depth JavaScript training.

Don’t be fooled, though—the training videos in the lynda.com library are only tools to help you encourage your kids to be life-long learners. In the end, you’re the parent with secret ninja skills of persuasion and encouragement. We’re only here to be your trusty sidekick.

If you have kid programming stories, or tips to share with other parents, we’d love to hear your thoughts! Please leave a comment and let us know your story, and keep us updated as you and your son or daughter progress.

Interested in more? • All developer courses on lynda.com • All courses from Ray Villalobos on lynda.com

Suggested courses to watch next:• Building Facebook Applications with HTML and JavaScript• JavaScript Essential Training (2011)Practical and Effective JavaScript • Foundations of Programming: Fundamentals

By David Gassner | Wednesday, January 18, 2012

Getting started as a programmer and what language to learn first

It scares me to say this, but I’ve just celebrated a big anniversary: I’ve been a software developer for 25 years. My first programming language was something called PAL. It stood for Paradox Application Language, and was a part of Paradox, a popular DOS-based database application that was in many ways the Microsoft Access of its time. Over the ensuing years, I’ve learned and forgotten many languages as I moved into different areas of the software development world. But I found that each language was progressively easier to learn. Once I understood the fundamentals, I was able to apply lessons learned so far to the new challenges facing me.

No one was around in the beginning to tell me that programming was difficult. I had some work I needed to do, and with the help of sample code and tutorials, I figured out how to do it. It was only later that I learned how intimidating programming sounds to some folks. But it doesn’t have to be painful at all, and I believe that by finding and using the right learning resources, and moving forward in small incremental steps, anyone can learn to code.

We’ve been hearing from our members for the last few years that programming has become more important to you, and so in 2011 we responded by publishing a series of courses on some of the world’s most popular programming languages. In this post, I’m going to describe what you need to know to get started as a programmer and how to select a first programming language to learn.

If you’ve never done a lick of programming, you might want to start with lynda.com staff author Simon Allardice’s course Foundations of Programming: Fundamentals. As in many industries, software developers have their own lingo. Words like statement, function, method, and property have very specific meanings, and some of these meanings can differ from one language to the next. Simon explains the language of languages, and compares many of the most popular programming languages with each other. Examples are provided in JavaScript, Java, C#, and many others.

The next step is to choose your first language. Which language you choose will depend largely on what you want to accomplish. You might use one language for building web pages, another for creating applications designed for cell phones and tablets, and so on.

The most popular programming language course in the Online Training Library® is, unsurprisingly, the most recent edition of our ever-popular JavaScript Essential Training, also authored by Simon Allardice. JavaScript is so popular because it’s the programming language of the modern web. It’s the language that “glues” other web technologies together, such as HTML and CSS. It’s supported in all modern browsers, and is at the core of many popular web frameworks such as jQuery. Looking beyond the browser, JavaScript is also used in many other software development environments, including Titanium, a set of tools for building cross-platform mobile applications, Node.js, a recent entry in the world of server-side web application development, and Unity, a package that enables building games for many platforms.

If you want to build native apps for mobile devices, you might choose Objective-C to build apps for iPhone and iPad. Objective-C Essential Training will help you get started, and then you can move on to our other courses on building apps for the iOS operating system. Java Essential Training with David Gassner (yes, that’s me) teaches the language that’s used to build native apps for Android and BlackBerry devices, and C# Essential Training with Joe Marini will help you get started with building Silverlight and XNA apps for Windows Phone 7. And once you learn either Java or C#, you’ll be able to build not just mobile apps, but also applications for the web (client- and server-side) and much more.

In addition to the courses we added in 2011, the Online Training Library® offers lessons on other languages that you can use for a variety of tasks. These include tutorials on Perl and Python with Bill Weinman, PHP and Ruby with Kevin Skoglund, and one of my own personal favorites, ColdFusion Markup Language with David Gassner (me again).

So regardless of which language you want to learn, you should be able to find some valuable tools in the Online Training Library® to help you get started. I really believe that if you have something you want to accomplish that requires a bit of programming, you can learn it. That’s lynda.com’s new motto, and it absolutely applies to the world of software development.

Interested in more? • All developer courses on lynda.com • All courses from David Gassner on lynda.com

Suggested courses to watch next:Foundations of Programming: FundamentalsJavaScript Essential Training (2011)Objective-C Essential TrainingC# Essential TrainingJava Essential Training

Get the latest news

  •   New course releases
  •   Pro tips and tricks
  •   News and updates
  
New releases submit clicked

You can change your email preferences at any time. We will never sell your email. More info

Featured articles

A lynda.com membership includes:

Unlimited access to thousands of courses in our library
Certificates of completion
New courses added every week (almost every day!)
Course history to track your progress
Downloadable practice files
Playlists and bookmarks to organize your learning
Become a member

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.