"Python" entries

Everyone is a beginner at something

Becoming confident with the fundamentals.

lost_lake

Choose your Learning Path. Our new Learning Paths will help you get where you want to go, whether it’s learning a programming language, developing new skills, or getting started with something entirely new.

I’ve noticed a curious thing about the term “beginner.” It’s acquired a sort of stigma — we seem to most often identify ourselves by what we’re an expert in, as if our burgeoning interests/talents have less value. An experienced PHP person who is just starting Python, for example, would rarely describe herself as a “Python Beginner” on a conference badge or biography. There are exceptions, of course, people eager to talk about what they’re learning; but, on the whole, it’s not something we see much.

I work on the Head First content, and first noticed it there. You suggest to a Java developer looking to learn Ruby that she check out our Head First Ruby. “But I know programming,” she’s likely to reply, “I’m not a beginner, I just need to learn Ruby.” People, by and large, buy into the stigma of being a “beginner,” which is, frankly, silly. Everyone is a beginner at something.

Read more…

Comment

Learning programming at scale

Bringing some of the benefits of face-to-face learning to millions of people without access to an in-person tutor.

Millions of people around the world — from aspiring software engineers to data scientists — now want to learn programming. One of the best ways to learn is by working side-by-side with a personal tutor. A good tutor can watch you as you code, help you debug, explain tricky concepts on demand, and provide encouragement to keep you motivated. However, very few of us are lucky enough to have a tutor by our side. If we take a class, there might be 25 to 50 students for every teacher. If we take a MOOC (Massive Open Online Course), there might be 1,000 to 10,000 students for every professor or TA. And if we’re learning on our own from books or online tutorials, there’s no tutor or even fellow learners in sight. Given this reality, how can computer-based tools potentially bring some of the benefits of face-to-face learning to millions of people around the world who do not have access to an in-person tutor?

I’ve begun to address this question by building open-source tools to help people overcome a fundamental barrier to learning programming: understanding what happens as the computer runs each line of a program’s source code. Without this basic skill, it is impossible to start becoming fluent in any programming language. For example, if you’re learning Python, it might be hard to understand why running the code below produces the following three lines of output:

figure_1

A tutor can explain why this code prints what it does by drawing the variables, data structures, and pointers at each execution step. However, what if you don’t have a personal tutor?

Read more…

Comment: 1
Four short links: 4 August 2015

Four short links: 4 August 2015

Data-Flow Graphing, Realtime Predictions, Robot Hotel, and Open-Source RE

  1. Data-flow Graphing in Python (Matt Keeter) — not shared because data-flow graphing is sexy new hot topic that’s gonna set the world on fire (though, I bet that’d make Matt’s day), but because there are entire categories of engineering and operations migraines that are caused by not knowing where your data came from or goes to, when, how, and why. Remember Wirth’s “algorithms + data structures = programs”? Data flows seem like a different slice of “programs.” Perhaps “data flow + typos = programs”?
  2. Machine Learning for Sports and Real-time Predictions (Robohub) — podcast interview for your commute. Real time is gold.
  3. Japan’s Robot Hotel is Serious Business (Engadget) — hotel was architected to suit robots: For the porter robots, we designed the hotel to include wide paths.” Two paths slope around the hotel lobby: one inches up to the second floor, while another follows a gentle decline to guide first-floor guests (slowly, but with their baggage) all the way to their room. Makes sense: at Solid, I spoke to a chap working on robots for existing hotels, and there’s an entire engineering challenge in navigating an elevator that you wouldn’t believe.
  4. bokken — GUI to help open source reverse engineering for code.
Comment

Get started with functional programming in Python

Start writing shorter and less bug-prone Python code.

It is hard to get a consistent opinion on just what functional programming is, even from functional programmers themselves. A story about elephants and blind men seems apropos here. Usually we can contrast functional programming with “imperative programming” (what you do in languages like C, Pascal, C++, Java, Perl, Awk, TCL, and most others, at least for the most part). Functional programming is not object-oriented programming (OOP), although some languages are both. And it is not Logic Programming (e.g., Prolog).

I would roughly characterize functional programming as having at least several of the following characteristics:

  • Functions are first class (objects). That is, everything you can do with “data” can be done with functions themselves (such as passing a function to another function). Moreover, much functional programming utilizes “higher order” functions (in other words, functions that operate on functions that operate on functions).
  • Functional languages eschew side effects. This excludes the almost ubiquitous pattern in imperative languages of assigning first one, then another value to the same variable to track the program state.
  • In functional programming we focus not on constructing a data collection but rather on describing “what” that data collection consists of. When one simply thinks, “Here’s some data, what do I need to do with it?” rather than the mechanism of constructing the data, more direct reasoning is often possible.

Functional programming often makes for more rapidly developed, shorter, and less bug-prone code. Moreover, high theorists of computer science, logic, and math find it a lot easier to prove formal properties of functional languages and programs than of imperative languages and programs.

Read more…

Comments: 2

4 ways the Raspberry Pi is being used in education

Get inspired to create, teach, and learn with the Raspberry Pi.

raspberries

The Raspberry Pi is a small computer that can be used for a variety of projects, and has been heralded as a great boon to education due to its flexibility and simplicity. While PcPro magazine noted in January of 2014 that Pi’s were “gathering dust” in classrooms, production has not ceased. The usage map is pretty impressive and the Raspberry Pi 2 was recently released.

In February of this year, the Raspberry Pi Foundation announced that they’re starting a mentoring program for people 16-21 years old. Here are four other ways that the Pi is being used in education and growing the tech community.

Read more…

Comments: 2

Learn a C-style language

Improve your odds with the lingua franca of computing.

tools
You have a lot of choices when you’re picking a programming language to learn. If you look around the web development world, you’ll see a lot of JavaScript. At universities and high schools, you’ll often find Python used as a teaching language. If you go to conferences with language theorists, like Strange Loop, you’ll hear a lot about functional languages, such as Haskell, Scala, and Erlang. This level of choice is good: many languages mean that the overall state of the field is continually evolving, and coming up with new solutions. That choice also leads to a certain amount of confusion regarding what you should learn. It’s not possible to learn every language out there, even if you wanted to. Depending on the area you’re in, the choice of language may be made for you. For the overall health of your career, and to provide you the widest range of future opportunities, the single most useful language-related thing you can do is learn a C-style language.

A boring old C-style language just like millions of developers learned before you, going back to the 1980s and earlier. It’s not flashy, it’s usually not cutting edge, but it is smart. Even if you don’t stick with it, or program in it on a daily basis, having a C-style language in your repertoire is a no-brainer if you want to be taken seriously as a developer.
Read more…

Comments: 2

Enterprising open source

Meg Blanchette interviews Continuum's Peter Wang about the growing role of OSS in the enterprise.

jars

If you attend OSCON this year, you may notice a bit more attention paid to the enterprise side of tech. That is on purpose, as we have been noticing the open source and enterprise worlds edging closer and closer. Companies traditionally nervous about open source are either recognizing the inherent value, or their developers are using it and they don’t even realize. Open source is, in turn, seeing the benefits an established company can bring a project and the various opportunities available.

In that spirit, I spoke with Peter Wang, from Continuum Analytics. Continuum is a good example of this new hybrid — offering open source technology, while also having an enterprise side. Here, we discuss the changing landscape and what that can mean for people who embrace change, and for those who don’t.

Read more…

Comment

Teaching kids how to code with Minecraft

Maintaining a focus on fun and interactivity keeps students engaged and enthused while learning Java.

I am jealous of kids these days. The sheer breadth and depth of technology and software at their disposal is staggering, everything from Raspberry Pi, Arduino, and Scratch to Minecraft, Python, and iOS app development. What’s even more profound to me is how fluent they are in using and interacting with these technologies. And yet during this process of assimilation, they are mastering fundamental mathematical concepts, like trigonometry, by figuring out how to shoot an arrow in Minecraft, as opposed to the classical way of learning the formulas. Or in learning how to program in Python, they are creating a game of Tic-Tac-Toe. Or in understanding basic circuits, they are building a traffic light using Arduino or Squishy Circuits.

I consider myself extremely fortunate to be involved with Devoxx4Kids, a Not-for-Profit, 501(c)(3) registered organization in the U.S., whose goal is to deliver Science Technology Engineering Mathematics (STEM) workshops to kids at an early age around the world. We delivered over 40 workshops in the U.S. alone last year on topics ranging from Python, Scratch, and Minecraft modding to NAO robots, Raspberry Pi, Arduino, and Little Circuits. Globally, we’ve delivered over 350 workshops and connected with approximately 5,000 students, with over 30% girls. Attendees from these workshops often leave with unique and inspirational stories to share. Read more…

Comment

5 reasons why Python is a popular teaching language

Python's simplicity makes it accessible to learners and teachers alike.

Download a free copy of Python in Education. Editor’s note: this is an excerpt from Python in Education, a free report written by Nicholas Tollervey.

I am going to answer a very simple question: which features of the Python language itself make it appropriate for education? This will involve learning a little Python and reading some code. But don’t worry if you’re not a coder! This chapter will hopefully open your eyes to how easy it is to learn Python (and thus, why it is such a popular choice as a teaching language).

Code readability

When I write a to-do list on a piece of paper, it looks something like this:

Shopping
Fix broken gutter
Mow the lawn  

This is an obvious list of items. If I wanted to break down my to-do list a bit further, I might write something like this:

Shopping:
    Eggs
    Bacon
    Tomatoes
Fix broken gutter:
    Borrow ladder from next door
    Find hammer and nails
    Return ladder!
Mow the lawn:
    Check lawn around pond for frogs
    Check mower fuel level 

Intuitively, we understand that the main tasks are broken down into sub-tasks that are indented underneath the main task to which they relate. This makes it easy to see, at a glance, how the tasks relate to each other.

Read more…

Comment: 1
Four short links: 10 April 2015

Four short links: 10 April 2015

Graph Algorithm, Touchy Robots, Python Bolt-Ons, and Building Data Products

  1. Exact Maximum Clique for Large or Massive Real Graphs — explanation of how BBMCSP works.
  2. Giving Robots and Prostheses the Human Touchthe team, led by mechanical engineer Veronica J. Santos, is constructing a language of touch that both a computer and a human can understand. The researchers are quantifying this with mechanical touch sensors that interact with objects of various shapes, sizes, and textures. Using an array of instrumentation, Santos’ team is able to translate that interaction into data a computer can understand. The data is used to create a formula or algorithm that gives the computer the ability to identify patterns among the items it has in its library of experiences and something it has never felt before. This research will help the team develop artificial haptic intelligence, which is, essentially, giving robots, as well as prostheses, the “human touch.”
  3. boltons — things in Python that should have been builtins.
  4. Everything We Wish We’d Known About Building Data Products (DJ Patil and RusJan Belkin) — Data is super messy, and data cleanup will always be literally 80% of the work. In other words, data is the problem. […] “If you’re not thinking about how to keep your data clean from the very beginning, you’re fucked. I guarantee it.” […] “Every single company I’ve worked at and talked to has the same problem without a single exception so far — poor data quality, especially tracking data,” he says.“Either there’s incomplete data, missing tracking data, duplicative tracking data.” To solve this problem, you must invest a ton of time and energy monitoring data quality. You need to monitor and alert as carefully as you monitor site SLAs. You need to treat data quality bugs as more than a first priority. Don’t be afraid to fail a deploy if you detect data quality issues.
Comments: 2