Technology

How North Korean Architects Imagine the Future of Cities

Gizmodo UK - 10 hours 16 min ago
Solar-powered factories, hovercraft apartments, glass towers topped with helipads: future North Korea is going to be a blast!
Categories: Technology

NSA And FBI Spied On Muslim-American Leaders

Tech Crunch - 10 hours 21 min ago
 Using the Foreign Intelligence Surveillance Act, the National Security Agency and the FBI spied on several prominent Muslim-Americans, including civil-rights activists, academics, lawyers and a political candidate, The Intercept reports. Read More
Categories: Technology

NSA And FBI Spied On Muslim-American Leaders

Tech Crunch - 10 hours 21 min ago
 Using the Foreign Intelligence Surveillance Act, the National Security Agency and the FBI spied on several prominent Muslim-Americans, including civil-rights activists, academics, lawyers and a political candidate, The Intercept reports. Read More
Categories: Technology

Why Python Makes A Great First Programming Language

Read Write Web - 10 hours 21 min ago

Python is now the most popular introductory language at American colleges, a recent Association for Computing Machinery study reports.

In an analysis of the top 39 computer science departments as ranked by U.S. News in 2014, the general-purpose programming language has replaced Java as the budding computer scientist’s first exposure to writing code. Eight of the top 10 CS departments (80%), and 27 of the top 39 (69%), teach Python in their introductory courses.

Invented 23 years ago, Python’s discovery as a great tool for first-timers has been more recent. The beginner-oriented Raspberry Pi has certainly influenced Python’s new role as a teaching tool, but also its increasing adoption at organizations like Google, Yahoo and NASA that make it valuable to know even after a programmer is no longer a beginner. In modern times, it has routinely been ranked as one of the eight most popular programming languages since 2008.

Perhaps not so coincidentally, Python is my first programming language, too. I’m halfway through Zed Shaw’s Learn Python The Hard Way on my road to mastery. And in this liberal arts student’s studies, I’ve noted a few key characteristics that make Python easy to grasp.

Here are some of the reasons Python makes a great first programming language.

Very Minimal Setup

To show you just how easy it is to get started with Python, let’s literally get started with Python.

On a Mac, find your Terminal program and open it. On a PC, find the PowerShell program and open that. It’ll be a blank box where you can write in text prompts.

Do that now. Write in the word “python” and hit Enter. You should see something like this:

If you don’t see that and instead see the words “python is not recognized” or something similar, you need to download Python, Python 2 to be exact, and try again.

Either way, it only takes a single word to get your computer to run Python. It doesn’t get much simpler than that.

It’s Written In Plain English

Python is so easy that we’re going to write our first Python program right now.

If you’re still running Python from the last section, type CTRL-Z on a Mac or “quit” on a PC to exit.

Now create a new blank Python file using Nano, a basic command line text editor. All you have to do is give it any name and end it with the suffix “.py” so your computer understands it is a program intended to be read by Python. The “nano” prompt simply opens it in Nano.

This is the most basic Python program you can write, a command that simply prints the words “Hello world” on your computer screen. Compare it to Java and C’s “Hello World” programs, which are each several lines long. There’s no weird syntax, no cryptic variables. Anybody can look at this one line and figure out what it does.

Save, and then run the file with the “python” command. It’ll print your program:

Errors Appear On Runtime

When you’re learning something for the first time, you’re inevitably going to make mistakes. Python makes it easy to identify and fix these mistakes immediately. That’s because Python displays errors at run time, instead of simply failing to compile the program.

Open up example.py, the program we just wrote before and intentionally make an error. Here, I’ve omitted a necessary quotation mark.

When I try to run the program, Python tries to point out where I went wrong:

Instead of displaying a blank screen where your program should have been, Python will run your buggy program and try to help you troubleshoot it.

Shallow Learning Curve

I began coding Python last week with the program above. A few days later, I’ve programmed my own basic text editor and calculator using Python.

Because Python has so little overhead and excess code, it becomes easy to grasp continually more difficult concepts since they mimic English sentence structure we’ve seen before.

We just built the most basic program possible. But even just knowing what you know about Python now, I bet you can take a guess as to what the following program does:

I’ll run this program using the Python command.

Sure enough, it lists how many students and teachers there are, and does a basic division problem for us. Did you guess correctly?

For the reasons above and many more that more experienced Python programmers can explain better than I, Python makes a great first programming language, especially if you don’t really consider yourself the math and science type. It’s really no surprise that American universities have come to the same conclusion.

Logo via the Python Foundation

Categories: Technology

Fire Brigade Warns of “Shiny Crystal (Door) Knob” Fire Risk

Gizmodo UK - 10 hours 26 min ago
Shiny door knobs, in league with Satan.
Categories: Technology

Today’s Best Reads From Our Other Sites

Gizmodo UK - 10 hours 27 min ago
Kotaku UK: From roofer to developer, or how anyone can make a game | Sigourney Weaver will be in the Alien Isolation game | The most violent Game Boy game isn't on the Game Boy | Lifehacker UK: How to get Android L's notifications on nearly any Android phone | The best cheap UK couriers | Amazon's launched a UK wearable tech store
Categories: Technology

PS4 Could Have Been Cheaper and Rubbish

Gizmodo UK - 10 hours 31 min ago
PlayStation 4 nearly swapped out the hard drive for flash memory and could have had as little as 2GB of RAM. It would have been dreadful.
Categories: Technology

A Clever Newspaper Ad That Transforms Into Two Mugs of Coffee

Gizmodo UK - 10 hours 46 min ago
Sometimes the most effective advertising is just getting the consumer to try a free sample.
Categories: Technology

A Striking Image of Saturn’s Polar Vortex, Hexagon and Rings

Gizmodo UK - 11 hours 1 min ago
You get three-for-one in this striking image of Saturn: its north polar vortex and hexagon along with its expansive rings. It was captured by Cassini's wide-angle camera earlier this year. [NASA]
Categories: Technology

Samsung’s Race To The Bottom

Mobile Crunch - 11 hours 3 min ago
 It’s happened before and it’s happened again – a popular commodity appears and is remade in so many permutations and from so many manufacturers that the differentiation ultimately focuses on price. When this happens, the small players sneak in with cheap hardware, the big players stumble and try to buoy sales with higher-end models (an example of this is the Dell Adamo as… Read More
Categories: Technology

Samsung’s Race To The Bottom

Tech Crunch - 11 hours 3 min ago
 It’s happened before and it’s happened again – a popular commodity appears and is remade in so many permutations and from so many manufacturers that the differentiation ultimately focuses on price. When this happens, the small players sneak in with cheap hardware, the big players stumble and try to buoy sales with higher-end models (an example of this is the Dell Adamo as… Read More
Categories: Technology

Sprint Asks If Two Useless Things Can Become One Useful One With The LivePro Projector Hotspot

Mobile Crunch - 11 hours 12 min ago
 Sprint is taking two devices with questionable utility and mashing them together to create a hybrid pocket projector/mobile hotspot that might actually succeed at making an actual Voltron out of pieces from the spare-parts bin. The Sprint LivePro is a small device (4.7-inches by 4.7-inches, with a thickness of 1.1 inches) that offers a built-in 4-inch display with Android 4.2 for direct access… Read More
Categories: Technology

Sprint Asks If Two Useless Things Can Become One Useful One With The LivePro Projector Hotspot

Tech Crunch - 11 hours 12 min ago
 Sprint is taking two devices with questionable utility and mashing them together to create a hybrid pocket projector/mobile hotspot that might actually succeed at making an actual Voltron out of pieces from the spare-parts bin. The Sprint LivePro is a small device (4.7-inches by 4.7-inches, with a thickness of 1.1 inches) that offers a built-in 4-inch display with Android 4.2 for direct access… Read More
Categories: Technology

Buzz Aldrin: The First Humans on Mars Should Never Come Home

Gizmodo UK - 11 hours 17 min ago
Buzz Aldrin was the second man to ever set foot on the moon, and he has some opinions about how things should go down when humans first set foot on Mars.
Categories: Technology

Net Neutrality Must Apply to Mobile Internet Access Too

Gizmodo UK - 11 hours 32 min ago
In today's world of smartphones and tablets people are spending less of their time on the internet typing at a computer and more of it swiping on a smartphone.
Categories: Technology

London Has Never Looked Better Than in These Mid-Century Linocuts

Gizmodo UK - 11 hours 46 min ago
The capital has been depicted in pretty much every creative medium available to human hands, but Edward Bawden's linocuts of the capital are some of the coolest.
Categories: Technology

Google Tests Personal Data Market To Find Out How Much Your Personal Information Is Worth

Technolgy Review - 11 hours 46 min ago

If you could sell your location data every day, how much would you charge? A research team including Google has carried out an experiment to find out.


The personal information that your smart phone can collect about you is increasingly detailed. Apps can record your location, your level of exercise, the phone calls that you make and receive, the photographs that you take and who you share them with and so on. Various studies have shown that this data provides a detailed and comprehensive insight into an individual’s habits and lifestyle, information that advertisers and marketers dearly love to have.

Categories: Technology

Chinese Supercloner Xiaomi Expected To Release A Fitness Tracker

Tech Crunch - 11 hours 49 min ago
 Watch out, Fitbit. Xiaomi is firing up its photocopiers again. Xiaomi makes the best cheap gadgets available. The company started out cloning existing gadgets, but has since moved on to designing and developing its own wares. And selling them dirt cheap. The company already sells several smartphones and a streaming TV device. Now reports state that company will soon release a fitness tracker. Read More
Categories: Technology

Google Maps Update Lets You Measure Distance, Draw Crude Pictures

Tech Crunch - 11 hours 54 min ago
 Google Maps just released a small, useful update for its Maps desktop product (via TNW). On the web, you can now right-click on any map and select “Measure Distance” to start charting a path and adding points, with Google offering up distances for each of the segments you create. It’s a handy way to find out approximately how far you’ll be travelling for a backwoods hike… Read More
Categories: Technology
Syndicate content