Webucator Blog

| May. 17, 2016

Python Project for Job Application

You have an opening for a Python developer in your company. Your company is awesome, so you expect to get a lot of applications. You only want to interview developers who have some experience writing object-oriented Python code. You don’t need to test the breadth of their immediate knowledge as much as their ability to get a project done using all the resources available to them.

Here’s an idea for a project you can give the candidates to demonstrate their proficiency with Python. Continue Reading »

|

NYTimes.com, Please Stop Blocking Copy & Paste

Please share to see if we can get the NYTimes.com to change this.

Dear New York Times website,

Awhile back, you released a new website design that prevents readers like me from copying content from your articles. When I double-click on a word to highlight it, the page zooms. That’s not what I want or expect. If I need to zoom in on a web page, I can zoom. All modern browsers have built-in methods for changing the display size of page content. Continue Reading »

| May. 6, 2016

When to use Static Methods in Python? Never

The short answer is in the title. Never use static methods in Python.

The initial intention of this post was to provide a simple and concrete use case for a static method in Python. I started with this 7-year conversation about static methods on StackOverflow, which seemed promising. But it doesn’t contain a single practical use case. And I think I know why. There are none.

Creating a static method is straightforward enough, but as Nathan Tregillus sort of asks in this post, the real question is why would you ever want to?

In answer to a similar question about when to use static methods in Java, Associate Prof not-just-yeti wrote this short-and-sweet explanation: Continue Reading »

| May. 4, 2016

Fixing a Blocked Port in XAMPP

You’re trying to use XAMPP to do PHP development. But when you start Apache, you get this error. The chances are that it’s due to a blocked port. In this video, I’ll show you how to fix that error by changing the port that Apache uses. Below the video, I provide text instructions. Continue Reading »

| May. 2, 2016

Checking your Sitemap for Broken Links with Python

We are about to launch a new website and, in doing so, we have restructured our URLs and used 301 redirects to point the old URL to the new URL. To make sure that we caught all the changes, we compiled a list of URLs on our old site using our sitemap and the Landing Page report from Google Analytics. We then used the Python’s request library to check all the URLs.

Using BeautifulSoup, you can easily check your own sitemap to make sure you don’t have any links pointing to missing pages. The code below shows how to do this using the NASA sitemap.
Continue Reading »

| May. 1, 2016

Python 3 surpasses Python 2 on Stack Overflow – April, 2016

Python 3 came out in 2008. That’s eight whole years ago. This past month, April 2016, is the first month that there have been more Python 3-related questions on Stack Overflow than Python 2-related questions. It has taken a long time, but Python 3 finally seems to be getting as much usage as Python 2. It’ll be interesting to see if this is a tipping point and usage of Python 2 begins to plummet. Here’s the latest chart:
Continue Reading »

| Apr. 26, 2016

HTML Attribute Values and Quotes (and Dreamweaver)

According to the W3C, HTML5 attribute values can be wrapped in single quotes or double quotes or no quotes at all. The same rules apply to HTML4, though some form of quotes is recommended. And in XHTML, values have to be wrapped in quotes, either single or double.

Dreamweaver CC 2015, out of the box, only wants double quotes around attribute values, which is weird. Misha Abesadze asked about this on the Adobe forum and Madhusudan N answered by describing how to fix Dreamweaver so that it doesn’t mark single-quoted attribute values with error messages. In the video below, we show the solution: Continue Reading »

| Apr. 14, 2016

Webucator Awards Computer Science Scholarship to University of Washington Student

Webucator offers a Computer Science scholarship annually to support a student who shows potential for leadership in the field of Computer Science. There was a lot of interest in the scholarship again this year and we are happy to award it to Hokyin (Joe) Ma, a student at the University of Washington. Hokyin has been interested in computer science since he was 12 years old and hopes to turn his passion into a career. Continue Reading »