General Gaming Article |
- The Beginner's Crash Course on Computer Programming
- Valve Gives Publishers Tools to Self-Discount Games
- Barnes and Noble to Release Another Nook Color Tablet
- Twitter Returns Hijacked @N Handle Worth $50,000 Back to Owner
- Qualcomm Gives Birth to 64-bit Snapdragons with Eight Cores, Integrated LTE
- Windows 8 Designer Offers Candid Explanation of Metro and Why Power Users Hate It
- Newegg Daily Deals: Nvidia Shield, Adata Premier Pro SP9 256GB SSD, and More!
The Beginner's Crash Course on Computer Programming Posted: 26 Feb 2014 04:19 PM PST Computer Programming: Every PC user should know how to program, and there's never been a better time to learnWith the huge variety of computing devices all around us, it's important to remember what it is that's special about a full-fledged personal computer. We think the main difference can be summed up in one word: mastery. No matter how much time you spend with an iPad or an Android phone or in a web browser, you can never truly master it. There's just not enough there to learn. But the PC? That's different. The PC goes deep. As you develop your mastery over the PC, you move past all sorts of boundaries. First, you learn to replace the software that came on the computer. You discover the command prompt and how to tweak the OS. You learn to build your own PC, and to benchmark it. And then, at the very bottom of it all, there's one last boundary standing between you and true PC mastery. You have to learn computer programming. Why is coding the ultimate test of PC mastery? Because learning how to program is the thing that breaks down the wall between you and your computer—it makes it possible for you to truly understand what's going on underneath your desktop. And, all philosophical ramblings aside, it's a pretty great skill to have. Whether you need to automate a process on your computer or whip up a quick web app for a family member's website, knowing how to code is a big boon. Who knows, you might even be able to earn some money. Learning to program isn't something you can do in an hour, or even in an afternoon. You have to learn to think in a whole new way, which takes dedication and patience. Fortunately, it can also be a lot of fun. In this article, we're going to take a whirlwind tour through some of the most important concepts in computer programming, and we'll direct you to resources that'll help you start your adventures in coding. Basic InformationA Q&A on the ABCs of programming Before we can do anything, we've got to cover the basics. Here's what you have to know before you can get started. When we say computer "programming," what does that really mean?For this article, we're going to use a fairly narrow definition of programming, and say that what we're talking about is the process of creating software on a computer. That process involves writing out a series of commands for the computer to execute, which will create our desired behavior. We write those commands using a programming language. What's a programming language?A programming language is the set of rules that define how we express what the computer should do when it executes the program. There's an incredible variety of programming languages available for use, but the vast majority of commercial and personal software is written in one of a core group of languages including C/C++, Java, C#, Python, and a few others. Modern programming languages share a lot of the same basic concepts and some syntax, so learning your second, third, or fourth programming language is much easier than learning your first. What makes one programming language different from another?Each programming language has its own strengths and weaknesses. C and C++ are low-level languages, meaning that code written in C is closer to the machine code that your CPU understands (see below). Low-level languages can produce faster, more efficient software, so they're used where performance is at a premium—for programming an operating system or a 3D gaming engine, for instance. High-level languages, like Java and Python, have the advantage of being much easier to program in, and the same program can generally be written with fewer lines of code in a high-level language. But which one's the best?There's no one best language—it really depends on what kind of programming you want to do. If you want to program native Windows applications, you'll use C#; if you want to program sophisticated web applications, Ruby would be a good choice; if you want to be the next John Carmack, you should probably start with C. No, for real, which language should I start with?The secret is to not stress too much about whichever particular language you start with. The important things you will be learning are all basic concepts that work pretty much the same in every programming language. You'll learn how to use data structures and conditionals and loops to manage how your code flows. You'll learn to structure your program in a way that's readable and organized. Once you've done all that, learning a bit of syntax to pick up a new language won't seem like much work at all. But, if you really want a suggestion, start with JavaScript. It's an easy language to learn, it's got some practical applications, and its syntax is similar enough to some more-powerful languages like C# and Java that making the transition later on won't be too hard. Is HTML a programming language?Not quite! HTML is a markup language, used to define the contents of a webpage. Although HTML has a specific syntax (a set of rules defining how you have to write things), it doesn't have semantics, or meaning. An HTML document is rendered, rather than executed. That said, if you have written an HTML document, you at least have experience writing a formalized computer language, which may make the jump to programming easier. What's an IDE?An IDE (short for integrated development environment) is the software suite programmers use to actually write programs. They generally include a specialized text editor for writing the source code, as well as the ability to test and debug your program. Two of the most popular IDEs are Eclipse (open source, free, and available at www.eclipse.org) and Microsoft Visual Studio (proprietary and expensive, but with a free "Express" version that's limited to and excels at programming in C, C#, and BASIC). Visual Studio is one of the most advanced IDEs around, and is used by nearly all Windows programmers. How can I start writing a program, Like, right now?Unfortunately, it can be a bit of a hassle to get started coding in most programming languages. You generally have to install and configure an SDK (software developer kit), and sometimes an IDE as well, in order to be able to write and compile code in a new language. It's rarely super hard, but be prepared to spend 15–30 minutes Googling, reading a guide for your chosen language, and setting things up. Fortunately, JavaScript is much easier to get started with. In fact, you can start writing code right this second, using an in-browser coding environment like JSFiddle.net. An in-browser IDE isn't a good solution for serious programming projects, but it's a great way to get started as a beginner. To start writing JavaScript in an interactive environment with structured lessons, you can visit www.codeacademy.com (but more on that later). Click the next page to learn about how it all works.
How Does It Actually Work?When you write a program in a high-level language like Java-Script, the document you create isn't something that your computer's low-level hardware can understand. The CPU has only a limited number of instructions it can perform, such as addition, subtraction, and moving numbers into and out of memory. These instructions are actually physically implemented in the CPU using transistors organized into logic gates. Though modern instruction sets, such as the X86-64 set implemented in any consumer 64-bit CPU, are actually very large and sophisticated, programming for the CPU directly (using a super-low-level language called assembly language) is an arduous, slow process. High-level languages allow you forgo a lot of the technical grunt work. For instance, in a high-level language, you can simply declare and use variables as you please, without ever worrying about what exactly is going on in your system's memory. In assembly language, you have to manually assign data to locations in memory as you use it, and clear up the memory when you're done. In order to get your high-level program to run on the CPU, you need a compiler—a piece of software that optimizes your code and converts it into a machine-readable executable file. Some languages, such as Java, are not compiled, but rather interpreted, which means that the source code itself is distributed, and then compiled on the end user's machine. The upside of an interpreted language is that you can distribute a single file that can be run on Windows, OSX, or Linux. The downside is that whoever runs the file has to have a copy of the interpreter on their machine—an annoyance that anyone who's tried to run a Java-Script applet on a new computer will be familiar with. Core ConceptsUnderstand these, and you've got everything you need to start writing programs in any language VariablesVariables in programming are a little different from the "X"s you remember from high school algebra. In programming, a variable is like an empty container—it can hold a number, a word, or any other data or data structure you want to use in your program. The program can read and change the variable's value as it runs, letting you keep track of and manipulate data. Variables are the basic building block of a program, and most lines of code in any program will include a variable in some form. In some languages, such as Python, a single variable can contain one type of data (say, a number), then can be assigned to hold a different type of data (like a word). In other languages, such as C and C#, a variable is declared, with a particular type, and then can only hold that type of data for the rest of the program. This is the distinction between dynamically typed and statically typed programming languages. ConditionalsMost programs do not run in a vacuum—they accept some form of user input. To deal with the uncertainty that this brings, we need to be able to write code that is flexible, and to do that, we need conditionals. Conditionals are places where the code branches. In most modern languages, they take the form of an if statement, which joins an expression that is either true or false (called a Boolean expression) and a block of code. The if statement says, in a nutshell, "If this Boolean expression is true, execute the following code. Otherwise, skip it." In most languages, if statements can also include an else clause, which allows you to specify a second block of code that will only be executed when the Boolean expression is false. For example, under the "Sample Code" section below, the 99BottlesOfBeer function includes an if statement that checks to see if the "age" variable is greater than or equal to 21, and sets a different variable called "drink" to an age-appropriate libation. LoopsAnother way you can control the order in which code is executed is with a loop. Where an if statement allows you to execute or not execute a certain block of code, a loop allows you to keep executing the same block of code multiple times. There are several different types of loops, but the two that you'll find in almost any programming language are the while loop and the for loop. A while loop works a lot like an if statement. You attach a Boolean (true or false) statement to the while loop, and as long as that statement is true, the loop keeps repeating. Basically it says "as long as this statement is true, keep going." As a consequence, something inside the looping code has to make a change that could cause the Boolean statement to become false, or else the loop will never end. For example, the following code will print out the word "hello" 10 times, then stop: Notice that we used the variable x as a loop counter, to control the number of times the loop runs. The other most common type of loop, the for loop, is basically just a while loop with a built-in loop counter. You tell the loop right away how many times you want it to run, like this: The part after "for" just defines a counter. It says "start with a number (integer) we'll call x, and keep looping as long as x is less than 10. At the end of every loop, increment x by one." FunctionsThe most powerful way to control the flow of a program is with functions, which allow you to reuse code. Also called a subroutine, a function is a block of code that you've given a name to, so you can reuse it any time you want. For example, you could define a function called PrintHelloThenGoodbye by doing the following: Then, if you called that function three times in your code, as follows: Your program would output "hello goodbye hello goodbye hello goodbye." A function can also take variables as inputs, and } Notice the "return" keyword. That passes the following value back to whatever part of the code called the function. So, if somewhere else in the code we called the function like this: The program would print out the number 25. SyntaxMaybe the most intimidating thing about programming is the syntax—the strange punctuation marks and cryptic words that make a page of code look like a foreign language. Fortunately, in most programming languages, syntax is really only a couple of rules that you have to remember, and a lot of syntax is shared between languages. It's all dependent on what language you're programming in, but here are a couple of syntactical elements that are common across many popular languages: Semicolon The semicolon is like the coding equivalent of a period—each line of code ends with one. It's important, because in many languages, line breaks are just for readability, and don't have any effect on the execution of the code. Parentheses Parentheses are used after functions (see above) to contain that function's parameters (or inputs). You might remember this usage from your high school math classes, when f(x) was a function that operated on the variable x. Curly braces In a number of languages (particularly those derived from C), curly braces "{}" are used to enclose and group blocks of code. They're used, for instance, after the control structures described here (if statements, loops, and functions), to designate the block of code that the statement refers to. Indentation Because all of the control structures can be nested inside each other, code tends to take on a sort of hierarchy. A particular line of code might be inside an if statement, which is inside another if statement, which is inside a loop that's inside a function. All that can get hard to keep track of! To make it easier, code is written with variable levels of indentation. The more indented a line of code is, the more deeply nested it is. In most languages, indentation is purely for readability, but in a few (like Python), it actually controls the grouping of code, and is used instead of curly braces. Sample CodeThis oh-so-practical program prints out an age-appropriate version of the song "99 Bottles of Beer." function 99BottlesOfBeer(int age) { var bottlesLeft = 99; if (age >= 21) { while (bottlesLeft > 0) Click the next page to learn how you can take action with computer programming! |
Valve Gives Publishers Tools to Self-Discount Games Posted: 26 Feb 2014 12:12 PM PST Get ready for even more discountsOne thing you can't accuse Valve of being is stingy with its Steam platform. It seems there's always a Steam sale going on, making it easy to add to your games collection quicker than you can actually play through your titles. Well, guess what? If you thought Steam sales were frequent now, they could become even more commonplace now that Valve is allowing publishers to self-discount their games. Valve announced new Steamworks tools for developers that will let them issue discounts whenever and however they like. According to the announcement sent out the Steamworks community group (and reposted on Reddit), developers can opt in or take part in upcoming week-long sales, select from upcoming promotions, and configure their own discount amount and date up to two months in advance. "You will be asked to enter in the dates it should run, up to a two-week maximum, and the percentage to discount by," the announcement reads. One of the concerns that popped up in the Reddit thread was that some of the better games could get buried under indie titles that run constant discounts. However, the Steamwork FAQ states that discounts must be spaced at least 2 months apart. |
Barnes and Noble to Release Another Nook Color Tablet Posted: 26 Feb 2014 11:50 AM PST B&N hasn't given up on its Nook divisionAs 2013 came and went, there was nary a new Nook tablet in sight. It would be easy to assume Barnes and Noble had given up on tablet hardware, but apparently that's not the case. Instead, Barnes and Noble confirmed it's planning to release a new Nook model sometime this year, though details are sparse -- about the only thing we know is that it's going to be a color device (tablet) as opposed to a black and white model (e-reader). "We remain committed to delivering world-class reading experiences to our customers through our reading centric e-Ink and color reading devices," B&N said in a statement. "The company is actively engaged in discussions with several world-class hardware partners related to device development as well as content packaging and distribution. As a result, we plan to launch a new Nook color device in early fiscal 2015." B&N's fiscal 2015 runs through this summer, though the lack of details makes us think a Nook tablet will make a debut towards the end of summertime rather than within the next couple of months. The company's Nook division made $157 million for the quarter, down more than 50 percent compared to a year ago. Device and accessories sales were $100 million for the quarter, down nearly 59 percent compared to last year. To rationalize its Nook business and contend with sagging sales, B&N said it made certain changes within its organization, including job eliminations after the quarter ended. |
Twitter Returns Hijacked @N Handle Worth $50,000 Back to Owner Posted: 26 Feb 2014 09:33 AM PST Bizarre hacking incident comes to a happy conclusionNaoki Hiroshima, original owner of the @N handle on Twitter, claims he routinely fielded offers for his coveted username, including one that was as high as $50,000. People have also tried to steal the rare username from him, though those attempts were unsuccessful until a hacker applied some social engineering skills to ultimately force him to hand it over. It's a bizarre story that involves ineptitude on the part of both GoDaddy and PayPal, though there's a happy ending -- Hiroshima has his username back. "This is a happy ending not only for me but also for sane employees and loyal users of Twitter's. Congrats to those, too," Hiroshima tweeted out with his original username. Part of the reason Hiroshima's made headlines is because of the way the hacker managed to gain control of his account. He did it by first calling PayPal and using some "very simple engineering tactics" to gain the last four digits of Hiroshima's credit card. He then called GoDaddy and told them he lost his card but remembered the last four digits, which ultimately allowed him to gain control of Hiroshima's account and his domains. "It's hard to decide what's more shocking, the fact that PayPal gave the attacker the last four digits of my credit card number over the phone, or that GoDaddy accepted it as verification," Hiroshima wrote in a blog post. That's the condensed version of what happened (check out Hiroshima's blog post for a full account of events), but short and to the point, the hacker used the hijacked domains to extort the @N handle from Hiroshima. GoDaddy has since said it would review its policies to prevent those types of incidents from happening again, while PayPal essentially buried its head in the sand. |
Qualcomm Gives Birth to 64-bit Snapdragons with Eight Cores, Integrated LTE Posted: 26 Feb 2014 08:24 AM PST New top-end mobile chips from Qualcomm bring the boomQualcomm just threw down the gauntlet in the mobile handset space by announcing some potent parts. More specifically, Qualcomm unveiled its Snapdragon 610 and Snapdragon 615 chipsets for high-end smartphones. According to Qualcomm, the 615 part is the world's first commercial octa-core solution with integrated LTE and 64-bit capabilities, while the 610 offers the same in a quad-core package. Both Snapdragon chipsets use the same Adreno 405 GPU found in Qualcomm's premium Snapdragon 800 tier. The Adreno 405 offers support for DirectX 11.2, Open GL ES3.0, Full Profile Open CL, quad high-definition (2560x1600) displays, and Miracast for wireless streaming of multimedia content. "Qualcomm Technologies is redefining the user experience for high-end mobile devices by amassing the unparalleled trilogy of an industry-leading LTE modem, 64-bit multicore processing, and superior multimedia," said Murthy Renduchintala, executive vice president, Qualcomm Technologies, Inc., and co-president, QCT. "64-bit processing capabilities are now an industry requirement for this tier, and we are meeting our customers' needs with both octa- and quad-core configurations, as well as bringing our superior Adreno 405 graphics and powerful suite of connectivity technologies to the Snapdragon 600 family of chipsets." Qualcomm also introduced its Snapdragon 801 processor, the newest model in the 800 series. Compared to the 800, it offers improved graphics and gaming, higher quality imaging with support for larger and faster camera sensors, better image post-processing, and a few other upgrades. |
Windows 8 Designer Offers Candid Explanation of Metro and Why Power Users Hate It Posted: 26 Feb 2014 07:12 AM PST Metro is the antithesis for power usersTo put it bluntly, "Metro is shit for power users." Those are the words of Jacob Miller, a UI designer for Windows 8 who lunged into a Reddit bash fest of Windows 8 that began with a discussion of how many licenses have been sold to date. To be clear, Miller's intent was not to pile on the Windows 8 hate, but to clarify why Metro exists. To do that, he wanted to start from common ground before going down the rabbit hole, hence his opening comment. To sum it up, Miller said Metro exists as a content consumption space. It's for casual users who are really only interested in doing things like updating their statuses on Facebook, viewing photos, and "maybe posting a selfie to Instagram." He tossed out examples of your computer illiterate little sister and your mom who only wants to look up recipes. "That is what Metro is. It is the antithesis of a power user," Miller explains. "A power user is a content creator. They have multiple things open on multiple monitors -- sometimes with multiple virtual machines with their own nested levels of complexity." Miller then explained how before Windows 8, casual users and content creators had to hare the same space, kind of like a one-size-fits-all tuxedo that isn't tailored towards any specific group. As a result, many features were cut from previous versions of Windows. "So why make Metro the default? And why was there no way to boot to desktop in Windows 8.0? The short answer is because casual users don't go exploring," Miller said. "If we made desktop the default as it has always been, and included a nice little Start menu that felt like home, the casual users would never have migrated to their land of milk and honey." The good news for power users is that the casual crowd now knows about their new home, so now Microsoft can "start tailoring." Miller admits it will take some time for power users to see the benefits and that there's a lot of work left to do, but over time, the desktop will become more advanced and have things added to it that Microsoft couldn't add before, perhaps even multiple desktops like OSX and Linux have. "Things will be faster, more advanced, and craftier than they have in the past -- and that's why Metro is good for power users," Miller concludes. Check out his full (and surprisingly candid) explanation, and then let us know in the comments section below if it affects how you view Metro. Also, kudos to Daily Tech for digging this up on Reddit. Image Credit: Flickr (Ceo1O17) |
Newegg Daily Deals: Nvidia Shield, Adata Premier Pro SP9 256GB SSD, and More! Posted: 26 Feb 2014 06:06 AM PST Top Deal: Nvidia's Shield handheld is unique in that it's a rather powerful Android device at its core (Tegra 4 SoC clocked at 1.9GHz) but is also capable of streaming PC games from your desktop over Wi-Fi. We spent some hands-on time with the Shield, and while it's not perfect, it's a decent overall portable. Plus, it's less expensive now than when we reviewed it. The value proposition is even higher as today's top deal, which features the Nvidia Shield for $250 with free shipping and free Newegg $25 Gift Card with purchase. To recap, the Shield sports a 5-inch 720p Retinal display, 802.11n 2x2 MIMO Wi-Fi connectivity, mini-HDMI output, and a few other tidbits. Other Deals: Corsair HX1050 1050W ATX12V / EPS12V 80 Plus Gold Certified Modular Power Supply for $180 with free shipping (normally $210 - use coupon code: [EMCPHHE25]; additional $20 Mail-in rebate) CM Storm Trooper - Gaming Full Tower Computer Case for $120 with free shipping (normally $150 - use coupon code: [EMCPHHE55]; additional $20 Mail-in rebate) Adata Premier Pro SP9 2.5" 256GB SATA III Internal Solid State Drive for $125 (normally $130 - use coupon code: [EMCPHHE54]) Asus Black 23-inch 1ms (GTG) HDMI Widescreen LED Backlight LCD Monitor for $130 with free shipping (normally $170 - use coupon code: [EMCPHHE49]; additional $20 Mail-in rebate) |
You are subscribed to email updates from Maximum PC - All Articles To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |