background preloader

Learn How to Code Part I: Variables and Basic Data Types

Learn How to Code Part I: Variables and Basic Data Types
Want to learn how to code but don't know where to start? We've got you covered. We'll be teaching you the basics all week, and here's your first lesson. Previously we've provided you with some resources for learning to code and given you a broad overview of the process, but now it's time to get down to business: We're offering a short 101 course, step by step. You can't learn to code overnight (or in a week), but we've broken up the basics into a few lessons that will be released as the first four parts in our brand new Lifehacker Night School series. Each lesson will be video-based (as you can see above), but we'll also provide you with text notes and files that you can refer to as well. Our first lesson is going to be very simple and consist of learning about basic variables and data types. Let's get started! What Are Variables? You can think of variables as labeled jars that store different types of data. myVariable = "Hello world!" To Var or Not to Var myVariable = 5;

Biggest Crop Circle Ever ! On August 7th 2009 (7,8,9 ... Evolution Sequence Activated ...ツ) , a gigantic (530 meters X 450 meters) appeared in Southern Holland (Netherlands) near a town called Goes. This is the biggest crop circle ever reported which speaks it's message loud and clear, 'Humans are Evolving' ... well illustrated by the metamorphosis of a caterpillar into a butterfly ! The human figure in the crop circle formation looks a lot like Da Vinci's "Vitruvian Man" or the man you see in the header for the Mayan Prophecy 2012 Blog. In a case of super synchronistic fluttering~by mysticism ... ツ The first reaction for many on seeing this magnificent crop circle is usually a 'BiG WOW' coupled with some spine chills and a rising wave of excitement seeing this brilliant transdimensional crop circle message of 'Evolution' ! The butterfly is symbolic of growth, change and transformation. Butterfly, Power Animal, Symbol of Change, The Soul, Creativity, Freedom, Joy and Colour By Ina Woolcott References :

Learn to Code Part II: Working With Variables @pllee123: Much as I agree with the college classes are a good way to go. I've been a developer for over five years now and I've never been to a class in my life. It was just curiosity that caught me. @pllee123: I'm hoping that this will give me a (re-)start in a language again. @pllee123: It doesnt take classes. Back in 1998 we used to joke; what did the high skewl drop out say to the CS major? And now... there are tons of free resources to learn pretty much anything, and forums and chat channels to exploit. I wrote my first program when I was 12, wrote my first ML program when I was 13. The nest way to learn is to not be afraid of what you don't know and have a real problem to solve.

Learn to Code Part III: Arrays and Logic Statements A few tips: (1) You can easily create an array simply by using the literal notation, e.g.: var myArray = ["foo", "bar"]; (2) This might seem like splitting hairs, but unless you're doing some kind of array mutation where this would be sensitive, it is more performant to store the length of the array in another variable before iterating, rather than checking it every time through the loop. for (var i = 0, len = myArray.length; i < len; i++) { ... } (3) Either your examples are assuming var i was already declared, or you're leaking globals again. (4) Perhaps this is a little advanced to bring up, but I'll mention it nonetheless because it's VERY important. For those interested, I've seen Eloquent JavaScript recommended time and again as a great introduction to JavaScript as well as programming. Also if you eventually become serious about understanding crucial concepts of the language, be sure to pick up JavaScript: The Good Parts by Douglas Crockford.

Learn to Code Epilogue: Best Practices and Additional Resources Great post. The bit about comments being even for yourself 6 months from now is so true it's not even funny. Just to clarify (and further stress) why eval in JavaScript is evil: It's not that it just treats a string as a variable per se; it attempts to *execute* any string as JavaScript code. This means that you could put anything that would run in JavaScript into a string, throw it into that function, and it'd run. Why is this evil? For both security and performance reasons. Security, because if you somehow manage to throw some unsanitized user input straight into an eval call, you're basically opening yourself up to a potential world of hurt. Performance, because in order to execute the string passed to eval as code, an additional instance of the JavaScript runtime is fired up to execute it. Also keep in mind, calling setTimeout with a string parameter is equivalent to calling eval; you should pass setTimeout a function instead whenever possible. function doStuff() { return { foo: 'bar'

CorelDRAW video tutorial: Make a Polaroid-like image in five minutes When most people hear the words "vector graphics", the first thing that comes to mind is Adobe Illustrator. While Illustrator is a wonderful application, it's certainly not the only game in town: I've been using CorelDRAW for several years now, and I just love it. I'm not a graphics pro by any stretch of the imagination, but I do need to turn out a few pretty pixels here and there for my day job. If you're just thinking about getting into vector graphics, or if you've tried Illustrator and it proved too daunting, CorelDRAW might be just what you need. Rather than just talk about CorelDRAW or write a tutorial, I figured it would be best to show it off in a short video. I took an image of my awesome cat, Ivan, and made it into a Polaroid-like snapshot. By the way, this is the first of four CorelDRAW tutorials to be published in the next few weeks. Tags: apps, corel, coreldraw, graphics, hands-on, handson, photography, video

CorelDRAW video tutorial: Add detail to any image using the Mesh Fill tool This is the third of four weekly CorelDRAW demos/tutorials. The previous two were about making a Polaroid-like image and vectorizing a simple logo. This week's video is more of a simple demo than a tutorial: One of CorelDRAW's coolest features is the Mesh Fill. Those of you familiar with Adobe Illustrator will recognize the tool instantly: It allows you to add a great level of detail to otherwise simple vector objects. You can take a simple oval and make it into a photorealistic water droplet using nothing but the Mesh Fill tool. This tool requires a great deal of practice to master – it's not a simple technique. Tags: apps, CorelDRAW, demonstration, education, graphics, mesh fill, MeshFill, video

How to Turn Your Home Ubuntu PC Into a LAMP Web Server Got a Linux PC you want to put to work? Maybe you’re not comfortable with the command-line only version of Ubuntu Server Edition. Here’s how to keep the standard Ubuntu desktop and add web-serving capabilities to it. Whether you’re not comfortable with a command-line only system, you’re using your Ubuntu desktop for other things, or you just need it installed for a few particular apps, you can add Apache, MySQL, and PHP to any standard desktop installation of Ubuntu very quickly and easily. The Simple Command Let’s start installation with the use of a very clever command: sudo apt-get install lamp-server^ It will NOT work without the caret at the end. Just sit back and let it do its thing until you get a blue screen pop up. Enter a password for the MySQL root account, which is what you’ll need to create other users and manage databases, then hit Enter to continue. That’s it for installation! Testing Apache and PHP Let’s test Apache to see if it’s serving properly.