CodeSOD: We All Float Down Here… |
When Maarten first saw the utility function below, he couldnt imagine why converting a number from float
to double
required a string
intermediate. Fortunately, whoever wrote this code followed best practices: their comment not only explained what the code is doing, it also explained why.
/**
* This method converts a float to a double.
* Because the model uses doubles in calculations while the matrices holds floats.
* @param number
* The float value to convert to a double
* @param accurate
* Flag to specify whether to use an accurate conversion from float to double
* or to use a less accurate conversion. Accurate means strings will be used
* what may result in a bit slower performance. Not accurate means typecasting
* will be used, this result in a fault since a double has a higher precision
* then a float.
*/
double floatToDouble(float number, boolean accurate) {
if (accurate) {
return Double.parseDouble(Float.toString(number));
}
return number;
}
While Maarten appreciates the authors effort, hes not entirely convinced that comments alone can a sensible method make&
Метки: CodeSOD |
Error'd: What, What? |
"Ah...it looks like someone is testing in Production as every link on Cleveland.com starts with this helpful alert," James writes.
"At just over 2400 light years away, our Sun must be intrinsically brighter than the rest of the galaxy combined," writes Wong
"You'd think that Google would rather have Chrome extensions added, but who am I to judge?," wrote Erwan.
Jeff R. wrote, "I'm not sure that I'll have time to catch up on this series after all."
"I didn't think that it was a big deal that I didn't enter a title," writes Jim B., "Whatever code generates the response letter disagrees."
"It's a good thing that I cut up a penny into tiny pieces for exactly this situation," Dustin W. wrote.
"Wow...That's one weird dog," Jeff F. writes.
Bob D. wrote, "Terror possessed me then when I noticed that one of our 2008r2 domain controllers hadn't been rebooted since 1971."
Метки: Error'd |
CodeSOD: Practical ValiDATEion |
Handling dates is difficult.
On paper, it doesn't seem to be a complicated task. After all, computers are good with numbers, and what are days, months and years if not small, supposedly easy-to-deal-with numbers?
But behind this deceptively simple facade lie all sorts of nasty traps. The historical baggage of our civilization means that a good programmer needs to deal with tens of different date formats, multiple calendars, leap years, leap seconds, and some dates simply going missing. One might argue that humanity should've hammered out a more unified, common system long ago — but since we're still at least two hundred years away from adopting stardates, we have to keep accounting for each and every edge case.
Fortunately, we coders are a smart bunch. Most languages have a good date library that takes at least some of that burden off our shoulders. Unfortunately, this being The Daily WTF, today's specimen decided to ignore them all and reinvent the wheel, with quite a few jagged edges...
function checkDate( dateName, dateIn, errorFlag ) {
var valid = new String("0123456789.");
var mon31 = new Array("01","03","05","07","08","10","12");
var mon30 = new Array("04","06","09","11");
var minYear= 1970;
var maxYear= 2018;
var regExp = /(\d.+)(\W)(\d.+)(\W)(\d.+)/;
// Check whether all characters are valid
for (a=0; a/ Check whether the input pattern is valid (date format dd.mm.yyyy)
if (dateIn.search(regExp) ==-1) {
if (errorFlag) {
alert ("Please provide a valid date in dd.mm.yyyy format.");
}
if (dateName == "dateFrom") {
window.document.Filter.dateFrom.focus();
}
if (dateName == "dateUntil"){
window.document.Filter.dateUntil.focus();
}
return false;
}
// Check whether the date is valid.
regExp.exec(dateIn);
if (parseInt(RegExp.$5,10) < minYear || parseInt(RegExp.$5,10) > maxYear) {
if (errorFlag) {
alert ("Please provide a valid year: " + minYear + "-" + maxYear);
}
if (dateName == "dateFrom") {
window.document.Filter.dateFrom.focus();
}
if (dateName == "dateUntil"){
window.document.Filter.dateUntil.focus();
}
return false;
}
if (parseInt(RegExp.$3,10) < 01 || parseInt(RegExp.$3,10) > 12) {
if (errorFlag) {
alert ("Please provide a valid month.");
}
if (dateName == "dateFrom") {
window.document.Filter.dateFrom.focus();
}
if (dateName == "dateUntil"){
window.document.Filter.dateUntil.focus();
}
return false;
}
if (parseInt(RegExp.$1,10) < 01 || parseInt(RegExp.$1,10) > 31) {
if (errorFlag) {
alert ("Please provide a valid day.");
}
if (dateName == "dateFrom") {
window.document.Filter.dateFrom.focus();
}
if (dateName == "dateUntil"){
window.document.Filter.dateUntil.focus();
}
return false;
}
for (a=0; a 31) ) {
if (errorFlag) {
alert ("Please provide a valid day.");
}
if (dateName == "dateFrom") {
window.document.Filter.dateFrom.focus();
}
if (dateName == "dateUntil"){
window.document.Filter.dateUntil.focus();
}
return false;
}
}
for (a=0; a 30) ) {
if (errorFlag) {
alert ("Please provide a valid day.");
}
if (dateName == "dateFrom") {
window.document.Filter.dateFrom.focus();
}
if (dateName == "dateUntil"){
window.document.Filter.dateUntil.focus();
}
return false;
}
}
var expYear= parseInt(RegExp.$5,10) % 4;
if ( (parseInt(RegExp.$3,10) == 02) && (parseInt(RegExp.$1,10) > 29) && expYear == 0) {
if (errorFlag) {
alert ("Please provide a valid day.");
}
if (dateName == "dateFrom") {
window.document.Filter.dateFrom.focus();
}
if (dateName == "dateUntil"){
window.document.Filter.dateUntil.focus();
}
return false;
}
if ( (parseInt(RegExp.$3,10) == 02) && (parseInt(RegExp.$1,10) > 28) && expYear > 0) {
if (errorFlag) {
alert ("Please provide a valid day.");
}
if (dateName == "dateFrom") {
window.document.Filter.dateFrom.focus();
}
if (dateName == "dateUntil"){
window.document.Filter.dateUntil.focus();
}
return false;
}
}
First thing that stands out is the great implementation of the copy-paste programming paradigm. All nine steps of the date validation process use the same error handling code, with the only difference being the error message — and each and every time, the same snippet is repeated to ensure that nobody dares to change the handler without being at least mildly inconvenienced. But don't be fooled — that doesn't mean the actual code is any better.
Another interesting aspect of the code is the attempt at validating the date format with a regular expression. By itself, the regular expression allows such dates as 999.123.20000, 12?34?56 and 15.5March.2099, while rejecting a perfectly valid 1.09.2015. Luckily, all non-digit, non-period characters are rejected in a loop before that, using the ever-so-helpful indexOf
function.
Other WTFs include comparing against 01 and 02 (luckily, 1 and 2 in octal are still 1 and 2 in decimal), making mon30
and mon31
arrays of strings only to parseInt()
them in code, and the biggest of all: not spending thirty seconds on Google to find moment.js, date.js or any other JavaScript date library that takes care of each of those rules, and more, in no more than two lines of code.
Метки: CodeSOD |
Ponderous at the Ponderosa |
Depending upon how long you've been in this industry, you've seen your fair share of bad design, bad code and bad users. Darren A. explains his dealings with bad management, and how a string of edicts there-from can crush kill destroy an organization.
In the past, before management decided to, well, manage, Darren's company was able to complete 15-25 major projects each year. Then they hired a new Head of Software Services, who felt that he needed to actively manage all facets of how things were done...
To:From: HOSS Subject: Project Progress Charts Hi Team, Now that our offices are finally redecorated, we can no longer allow any of those pieces of paper stuck to the walls. They look untidy and don't put forth the impression that we want to give to our customers. Henceforth, all project tracking charts are banned.
Hmmm, so we can no longer track the progress of our projects? No problem, we all know what we're doing and more or less how far along we are. We can guess at the deliverable dates.
A couple of months later, the project reporting from the team fell afoul of HOSS:
To:From: HOSS Subject: Burn-Down Charts Hi Team, From this point on I really must insist that those burn-down charts no longer be used. None of the senior management team can understand them and I cannot allow this situation to continue. I'm therefore banning the use of burn-down charts; you will just have to utilize another way to demonstrate progress on your project.
OK, it's possible to do all of this electronically, albeit a little harder to view huge project time lines on even the largest computer monitor. But it's doable...
To:From: HOSS Subject: UnitTestsTesting Tool Hi Team, I'm pleased to announce that we have now purchased a fantastic testing tool called SOATest (at no small expense). The test team will now take over this essential function so that the development team can stop wasting time writing unit tests. From this point forward, all unit testing is banned and only our new tool should be used to test our systems.
So now all developers are supposed to write, but not test code - at all? I wonder how this will turn out...
Fast forward a few months and not a single unit test had been written by the highly qualified test team. Not to worry, there were still highly qualified architects on the projects. These folks had spent a great deal of time working with users, support people, managers, auditors and even bean-counters to make sure that each project was designed to perform the necessary tasks at the required speed with the requisite redundancy and support the appropriate level of growth. Until...
To:From: HOSS Subject: Developer Input Hi Team, It has come to my attention that senior team members have been making decisions and forcing things to be done their way. From now on, all team members, regardless of level of experience, will get an equal vote in how things are done, and are free to change the project architecture as they see fit.
So all the effort that the senior architects, business users, support teams and auditors put in to agree on an architecture that will provide the necessary features, throughput, resilience and scalability could now be overridden by any junior developer who thinks he knows better?
Ah well, at least the applications would still be able to scale for the expected growth in the business:
To:From: HOSS Subject: Software Scalability Hi Team, I have noticed that development teams aren't finishing their work on time because they're spending an inordinate amount of time getting the code to work for far larger transaction volumes than are needed today. From now on, we will only build what we need today, and no longer worry about future scalability; we'll deal with those needs when they happen.
...even though the requirements specify two orders of magnitude growth within 12-18 months. Then it became apparent why he was no longer concerned about making software scalable.
To:From: HOSS Subject: Software Scalability Hi Team, The company has invested a great deal of time and money in building a distributed grid computing environment for computer work. From now on, all applications will be deployed on the grid.
...but all of the applications are essentially fat batch-type clients, that won't ever be able to leverage any of the capabilities available in a grid computing environment.
With the entire suite of unit tests trashed, four new products and a large API (that lacked even the most basic unit testing) ready for use, they embarked on a large deployment to jam all of this untested fat-client software onto a grid environment.
It. Took. Nine. Hours.
The fallout took over a month to resolve and involved a great deal of weekend work, plus so much Mon-Fri overtime that the entire team turned pale from lack of sunlight.
In the years since HOSS' team embarked on this brave new software development methodology, they've 'increased' their output from 15-25 projects per year to... 3, and lost nine of their most competent developers, including Darren.
Метки: Feature Articles |
CodeSOD: A Convoluted Time Machine |
The web team and the JDE development team rarely see eye-to-eye in Cho's company. Cho, the JDE developer, worked in a world full of Oracle databases and important financial records. Andrew, a web developer, worked in a world full of MS-SQL and sales appointments. So when Andrew asked Cho to put together a job that would remove debt records older than six years so they'd stop showing up in his sales reports, he figured she had things well in hand.
"Six years?" mused Cho. "I'll have to build a custom function to figure out the start and end dates... I'll get back to you."
Two weeks after launch, several production incidents had been traced back to this new functionality. Of course, Cho had gone on vacation, so it was up to Andrew to dive into the seedy world of Oracle databases and debug the function...
/* Cast today's date to a character value */
v_end_date_char := TO_CHAR ( TRUNC ( SYSDATE ) , 'MM/DD/YYYY' );
/* WI requires removal of debt 6 years back, so obtain the year for
the purpose of building a 6 year old date */
v_year := TO_CHAR ( TO_NUMBER ( SUBSTR ( v_end_date_char, 7, 4 ) ) - 6 );
/* Check for leap year */
IF ( ( TO_NUMBER ( SUBSTR ( v_end_date_char, 1, 2 ) ) = 2 ) AND
( TO_NUMBER ( SUBSTR ( v_end_date_char, 4, 2 ) ) = 29 ) ) THEN
/* Adjust for a leap year and build date six years ago */
v_end_date_char := '02/28/' || v_year;
ELSE
/* Build the two digit day of the year */
v_day := TO_CHAR ( TO_NUMBER ( SUBSTR ( v_end_date_char, 4, 2 ) ) );
/* Build the two digit month of the year */
v_month := TO_CHAR ( TO_NUMBER ( SUBSTR ( v_end_date_char, 1, 2 ) ) );
/* Build the character representation of the date six years ago */
v_end_date_char := v_month || '/' || v_day || '/' || v_year;
END IF;
/* Build date for query to compare with duedt field */
v_end_date := TO_DATE ( v_end_date_char, 'MM/DD/YYYY' );
Andrew stared at the function for a solid thirty minutes before reaching for the delete key. A quick Google search revealed a much cleaner way of getting the date:
add_months(sysdate, -72)
Метки: CodeSOD |
Finally Clear |
Neil’s first contributions to the company codebase were to be tested in the fires of a late afternoon code review. Donavan, a veteran of Java since 1.1, was asked to sit in.
It began as a thankfully uneventful affair — but then Donavan noticed that Neil had removed the finally from an existing try/catch/finally block.
“Why’d you do that?” he asked.
“Well, because a finally block is indeterministic,” Neil explained.
Donavan frowned, smoothing out the startled What?! in his throat into a calmer, “What do you mean?”
“You never know when it’s going to execute,” Neil elaborated. “It may never execute. It also causes severe performance and portability problems. It’s not good practice to use.”
“I’ve… never heard of that,” Donavan replied, patiently stowing his skepticism for the moment. “I can only think of two reasons why a finally block might not run: one, the thread executing the try/catch is halted or killed. Two, the JVM crashes or exits in the try or catch block.”
“I’ve read about this before. I know what I’m talking about,” Neil huffed, folding his arms.
“Where’d you read this?” Donavan asked gamely.
“I think it came from a book called Effective Java,” Neil replied.
“I have that book,” Donavan replied. “This is news to me.”
Neil tugged at his collar. “Well, I — I think you’ll find the new code performs much better, and is safer.”
“Did you run any performance tests against it?” Donavan asked.
Neil’s face grew steadily redder, until he wrapped around the spectrum and approached violet. “I have fifteen years of Java experience!”
The experience card? With Donavan? This guy was new, all right.
“Whoa! You don’t have to get defensive about this.” Donavan put up his hands. “I just want to know why you did this, and what your source was. I’m not going to propagate this information by saying ‘Some guy told me this was the case.’ I’d like to read it for myself.”
“I know it was Effective Java,” Neil replied. “Look it up, if you want!”
The rest of the code review proceeded without fanfare. Upon returning to his cube, Donovan googled for information on when and why not to use finally in Java. He found nothing enlightening.
Then he searched for “Effective Java finally.” There, in an online version of the book, Chapter Two made reference to avoiding finalizers, stating the exact same facts Neil had attributed to the hapless finally block.
There it dawned on Donavan: Neil had either confused the terms, or he believed that a finally block was actually itself a finalizer.
Donavan jumped up and checked Neil’s cube, only to find it empty. So he sent an email with the citation. I can see how the terms can be confusing, he added at the end, hoping to soften the blow.
After clicking the Send button, Donavan sat back and folded his arms with a thoughtful frown, pondering the long-term effects of such an innocent slip. In Neil’s alleged 15 years of experience, how many finally blocks had he delete-keyed into oblivion?
Fortunately, Neil wasn’t so set in his ways that he couldn’t correct course when proven wrong. He and Donavan had a good laugh about it the next day. And once Neil finally understood finally, they could finally program happily ever after.
Метки: Feature Articles |
Error'd: Language Barriers |
"'Soll das Fenster geschlossen werden?' means roughly 'Should the window be closed?'," wrote David, "Hovering over the 'No' option shows that it will invoke doNothing(). Thank goodness!"
"I thought I'd made a typo in my search, but it appears Sears has me covered anyway," John G. wrote.
Ruud H. wrote, "In the heading, you can see that someone left 'Henk' a message as to the availability of newer components."
"I got this while adding a date to a job application site," writes Andy S..
"Direct3D support isn't available on Windows? How is this even possible!?" Miquel B. writes.
"Cumberland Farms gas stations now play annoying commercials at extremely high volume when you pump gas, so imagine my delight at seeing this while filling my tank," James writes.
"I don't think one can possibly get out of an error hole like this one," writes Anon.
"This ironic message appeared while trying to get product documentation for a WD Live Media Streamer I recently purchased," Andy wrote.
Метки: Error'd |
Taxing Production Tests |
As some readers already know, the Polish government is not on the best of terms with modern technology. We'd be damned, however, if that stopped us from trying- even if the end result is as much of a mess as Michal reports it to be.
The story began in 2008, when the government decided it needed some presence on this new hip thing called the Internet. And so, the Electronic Platform of Public Administration Services, or ePUAP for short, was born- a website serving to ease communication between public administration and Polish citizens. It went mostly unheeded until 2011, when the Trusted Profile functionality was introduced- and with it, the ability for people to do taxes, file applications, and submit other paperwork fully online.
Surprisingly, the website worked mostly fine. But soon after the first wave of interest, problems began to appear. Every update led to major downtime. Features such as password recovery would either break or have days-long delays. And, an investigation of a corruption scandal revealed that ePUAP- along with several other services- was the fruit of rather shady dealings.
Michal's story concerns an incident from a month ago, when the whole system crashed and burned. Most users were unable to log in, and the lucky ones who could found that their Trusted Profiles and personal data were missing. It turned out to be a major problem for everyone who elected to do their taxes over the Internet, since the system broke down just a few days before the April 30 tax deadline. Their only other options were to wait several hours in line at their local public offices, get hit with huge financial penalties, or write formal letters to the tax department describing how sorry they were.
The media caught the story, and managed to get a response from the Ministry of Administration and Digitization:
The work on a new version of ePUAP is underway. Maintenance-related downtime is expected. There's nothing alarming about it. Unfortunately, the tests we do can't be fully done over weekends.
Apparently, newfangled inventions such as "testing environments" haven't fully permeated the Iron Curtain. And so, this country-wide platform- holding the personal data of hundreds of thousands of people- is being tried in battle on production servers, during the year's most intense period of activity.
Метки: Feature Articles |
CodeSOD: Defensive Programming |
Marino was handed this code. Like all great code, its written defensively, protecting itself against nulls, empty strings, and other unexpected values.
I mean, sort of.
public static void LogMessageWithArguments(string message, params object[] args) {
Condition.Requires(message, "Message");
Condition.Requires(args, "arguments");
if (string.IsNullOrEmpty(message))
{
message = string.Empty;
}
if (args != null)
{
message = string.Format(message, args);
}
if (string.IsNullOrEmpty(message))
{
throw new NullReferenceException("Geen data om te loggen");
}
Log(message);
}
I mean, theyre really thorough about checking that the message has an actual value. Marino checked the Log
function, and found that it already had an overload the accepted a list of formatting parameters, thus making this function both redundant and ugly.
Метки: CodeSOD |
Paying Cache for Insurance |
If you asked the web developers at XYZ Insurance, a mere network engineer like Billy had no business snooping around in their code. He probably doesnt even know what HTML stands for, theyd sneer, and they kept sneering until a routine change to fulfill an audit requirement brought their internal website grinding to a halt.
This article is actually about a health insurance company, but they dont generally have cute CGI mascots
It was a security audit, and Billy had already seen the audit report. It was produced by a contractor at the request of corporate. There were two main problems with the internal site, and both were serious enough that Management told the developers to drop everything and fix them:
Now, Billy was no web developer, but he understood the proposed solutions: set a Cache-control: no-store
header on all pages with sensitive information (policy details, social security numbers, etc.), and add autocomplete="off"
to the tags that contained password fields. Simple. So simple, that when insurance agents started calling the support line complaining of empty white screens and sluggish responses, Billys team assumed their infrastructure must be to blame.
Definitely no network issues, Billy one of his technicians reported.
And the load balancers? Billy asked.
An awful lot of throughput, were at like 15-mbit, steady. But there doesnt seem to be anything wrong with them.
Its been four days! Billy put his face in his hands. Were gonna have to get Cisco on the phone.
The technician shuddered. Thats always fun. And expensive. Are you sure theres nothing left to check?
Billy thought long and hard. Well… I guess weve assumed the developers already debugged their end, but… He opened up a browser and its debugger and plunged into the forbidden world of web development. The first thing he noticed was a Cache-control: no-store
header on a page containing static content. A few more requests revealed the same. Did the developers really disable caching for every response in the application, forcing even mundane images, stylesheets, and scripts to be served over again on every round-trip? Turns out, thats exactly what the developers had done. Billy escalated to Management, and the fix was soon rolled out.
All was well for a few days- the weekend, really- but bright and early on Monday, another of Billys teammates pointed out that his browser was still offering to auto-fill his password. Billy started snooping around again and found that, while caching was disabled on the sites login form, autocomplete was not. On a hunch, Billy logged into a test account and opened a policy.
The page is still caching!
No way, Billys teammate came over to look at the developer console. Do you think they could just be messing with us?
Anythings possible. Wed better get some screenshots of the sensitive data still in cache before we raise this with Management.
Billys intuition turned out to be right; Management was skeptical that the network engineers were turning up so many bugs that the developers had missed, and initially dismissed the complaints. The proof was in the screenshots, however, and Management arranged a meeting to circle the wagons and cut the churn.
After Billy raised his points, the dev manager rolled his eyes. We were given two instructions, the dev manager explained: roll-back the disabled caching, and secure the login form. So thats what we did. Im not sure I see the problem.
At first, Billy didnt know how to respond. He took his copy of the auditors report, circled the two key recommendations in red, and passed it over to the dev manager.
If youll take a look at the report, youll see there are another two instructions. Would you please ask the developers to do those next?
The dev manager huffed. Fine.
The next day, caching was disabled site-wide again.
Метки: Feature Articles |
Best of Email: Best of Email: Super Spam Edition |
Next time you get an unwanted email, before you kick it into the bit-bucket, give it a quick read through. If it makes you go "WTF?!", kick it our way instead. We love 'em!
What's in a name anyway? (From Chris)
Mr. LName (or FName as his friends call him) sure are racking up a lot of bills on my email.
You May Address me as Mister NULL (From David J.)
Wait, Uncle Tony is dead? Why didn't anybody tell me?!
Not Gonna Send It (From Felix)
"Waiit, this is spam; I shouldn't send it... not in my network, nope...not gonna, not in my network, not gonna, not...aw screw it."
From red@cted.host Sun Apr 19 07:40:02 2015 Return-Path: red@cted.host X-Original-To: red@cted.host Delivered-To: red@cted.host Received: from [redacted] by redacted.localdomain with POP3 (fetchmail-6.2.21) for <user@localhost> (single-drop); Sun, 19 Apr 2015 07:40:02 -0800 (PST) Received: from redacted.fr (redacted.fr [99.999.99.999]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by example.org (Postfix) with ESMTPS id B88FCC1ED5 for <user@host.com>; Sun, 19 Apr 2015 07:30:39 -0800 (PST) X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network Received: from User (redacted.domain [999.999.99.999]) by redacted.host (Postfix) with ESMTPA id 4556624BAA8; Sun, 19 Apr 2015 15:38:56 +0100 (CET) Reply-To: <user@example.com> From: "Ameer"<user@example.com> Subject: Re: Good day Date: Mon, 20 Apr 2015 01:39:15 +1100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0121_01C2A9A6.4AAD0DB8" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 (The spam message...)
Let me put that on my calendar... (From Jesper)
Do spammers have different calendars than the rest of us?
Auto-Responder WTF (From Matthias A.)
Well, it looks like GMail leaves me no choice but to never return to work again.
A Questionable Job Title (From Des)
Wow! I really want that test job! They sound so enthusiastic about it!
Surprisingly Honest Phishing (From Jim B.)
You know, the self-awareness of this phishing attempt is really refreshing.
Just Testing!! (From Duncan J.)
Apparently, I both attended and missed the webinar.
http://thedailywtf.com/articles/best-of-email-super-spam-edition
Метки: Best of Email |
Error'd: Helpful as Ever! |
"One very helpful error, followed by another, and then Oracle Forms Designer crashed," Owen C. wrote, "I suppose at least it made an effort to tell me something was wrong!"
"You know, I wonder if the JavaScript error caused the lake to disappear," writes Mark M.
"I was looking to reset my Mac's PRAM. I didn't know I had to place an ad to get it up and running again," Wilfred K. wrote.
"I was in the Faroe Islands and was surprised to have stumbled upon the source of Apple's Command-keys," writes Mike S., "I gather that they get their control and option keys elsewhere."
Nicki M. wrote, "Whoa! At that price, I better act quickly! Thanks, Expedia!"
Sven G. writes, "Paint a C source file? Word seemingly a stock tracker? No idea what Internet Explorer, Virtual CloneDrive, or Visual Studio Version Selector icons represent."
"So, if ANONUSER can't access the login page, how exactly do I log in without already being logged in?" Chris M. writes.
"Ha! My laptop's battery lasts a whole work day...and then some," Benjamin writes.
Метки: Error'd |
The Daily WTF: Live: The Worst Boss Ever |
On April 10th, I hosted The Daily WTF: Live! in Pittsburgh. It was a blast. We had a great crowd, and some great performances.
Our final story is another one of my own, and this one is about… the worst boss ever. I mean it, and in this story, I can prove it. This is also arguably my first interaction with a real WTF.
This episode is brought to you by our sponsor, Puppet Labs. Check out their intro video, it gives a pretty good overview of how they help their customers get things done. Start a free trial today!
This brings our season of TDWTF:Live to a close. I had fun hosting and recording these stories, and I hope you had fun listening to them. Next Thursday will return to your regularly scheduled WTFs.
And since Paula is freaking out at the moment, pop over here for the comments.
At the Daily WTF, there’s one kind of story we get a lot of submissions for that we don’t often run, and these fall into the category of what I like to call a Bad Boss Story. There are three reasons we don’t run bad boss stories. The first one is you never really know if it’s truly that this boss was a terrible boss, or it was just somebody that has sour grapes. ‘Cause sometimes, you read them, and you’re like, ‘You just didn’t like the guy. It’s not that you had a bad boss, you just didn’t get along.’
The other reason is that there’s nothing IT specific about any bad boss story. Everybody’s had a bad boss. Raise your hand if you’ve had a bad boss. Pretty much everybody. And that’s one of the other reasons we don’t run them, there’s nothing IT specific. But the main reason we don’t run a lot of bad boss stories, is because I had the worst boss.
And I can prove this, and I’m about to in the next couple of minutes, I’m going to prove that I had the worst boss.
My story starts a little bit like Mark’s. I was graduating college and it was just around the DotCom bust. And I did not want to, after graduation, go home and live with my parents. I was very, very opposed to this. I happened to have some friends who were generous enough to let me impose upon their closet. I lived in their closet for about six months, so I really wanted a job. I was not very picky about the job, there was nothing really going, so as soon as I found a job- and it was an IT job. I was doing stuff with Word and Excel, not programming, but it was an IT job. Y’know what, it’s an IT job, I’m going to take it, and I don’t care about any of the details.
And that was my first mistake.
So, I walk in on the first day, and the Big Boss, Tom, the owner of the company is there to greet me. And I’m kinda overwhelmed almost instantly by Tom. Because first, Tom was so orange that Tropicana has sued him for trademark infringement. It wasn’t just, like the bottle-tan, Jersey Shore orange, because he had grey hair, and he wanted to ensure that he didn’t have any seams, so he would work the tanning lotion into his scalp, so he had this fringe of orange hair all the way around.
And that was just the first thing you notice. The second thing you notice is that he’s a very grabby boss. The very first thing he does is slap his hand on my shoulder and give it that… squeeze. “Hows everything GOING?” Ugggghhhhh.
But everything was going pretty well, because I had a job, and in a couple weeks I was going to be getting a paycheck. Everything was going well. I was enthusiastic.
I learned, very quickly, Tom was not- as much as he pretended to care (How’s everything going, SQUEEZE SQUEEZE SQUEEZE) he didn’t really care about his employees. So, when he needed you to work two weeks straight, 16 hour days, you were 16 hour days for two weeks straight. There was no compensation. There was no buy you a pizza. He didn’t buy you dinner. You just did that, because that was your job.
And again, I was still kinda happy to have a job, so I would drag my ass in at 7 in the morning, and leave at around 10 PM at night, and I’d do that for two weeks straight, three weeks straight- no, actually, after the third week, I needed to travel to a different location, so Friday night after the third week I get Saturday, but then Sunday I have to go drive ten hours away to the other side of New York State, which is where this was based.
So, that’s the next thing I learned about Tom. But y’know what? That’s still not why he’s the worst boss I ever had.
I learned a few other things about Tom, over time. First off, Tom didn’t have a good sense of where he was at any given moment, or what his purpose there was. One day, I’m sitting in the break room with one of my co-workers, and Tom comes in- and he bursts, he just explodes into the room, full of energy. There is a reason why he has come into the employee break room. He is looking for someone, to tell them something, and he bursts in, and he’s about to do it- you can see him winding up, you can see the gears turning. Then he looks at my co-worker, and he looks at her tights, which have this check pattern on them, and he says, “I just want to play tic-tac-toe on your legs.” And then he turns around and walks out. And we just take a long moment, I look at Paige, she looks at me, and we ask, “Did that just happen?” and the answer is yes.
Later that day, I was getting a cup of coffee and all of the sudden, THUMP “How’s everything going?” Ugh.
Little later than that, we actually learned another fact, didn’t know it at the time. Tom, and his wife- who worked there, she was actually the Vice President- always a sign of a healthy company- they were swingers. And they did invite some employees to some parties at points. They did invite some employees to parties at points. I don’t know whether to be happy or insulted that this never happened to me, but y’know? None of that is why Tom was the worst boss I ever had.
Tom was the sort of boss that really loved to have pep talks. Every Friday, at 4:30, you did not go home, you went to the mandatory meeting. There was no excuse that would get you out of that meeting. There was no excuse that would get you out of that meeting. If you called in sick that day, you couldn’t get out of that meeting. He really wanted to give you your pep-talk. And his pep-talk were absolutely content-free, but you also learned another thing about Tom.
Friday, at 4:30, Tom would be dragging ass just like the rest of us. You’d see him in the hallway and he wouldn’t go “THUMP How’s everything going?” He’d be, “eh”, it’s Friday, at 4:30. But right before the meeting, he’d go into his office and close the door. And then the door would open, and (sniffling sound) he would come out and he was READY TO PEP YOU UP.
But Friday at 4:30 coke fueled meetings were not why Tom was the worst boss I ever had.
One day, I come into work, and Tom’s not there. Which, is actually a pretty good thing. Everybody’s pretty happy about that. Nobody’s upset that Tom’s not there, until Chris, the Ops Manager, starts running around frantically to everybody. “There’s a meeting during lunch, and you HAVE to be there. Don’t go to lunch, doesn’t matter if you didn’t think to bring a lunch, you HAVE to be at this meeting.”
I’m like, “Oh god, what’s Tom gonna do to us now?” Well, as it turns out, Tom wasn’t going to do anything to us, because Tom had drained the company’s bank accounts, run off to Connecticut, left about two dozen contracts unfulfilled, and was being hounded by lawyers. The content of this 12 o’clock meeting was “We don’t know where Tom is, we don’t know how to get in touch with Tom, but if Tom contacts you, let us know. The State Troopers would like to have a conversation with him.”
And that’s STILL not why Tom was the worst boss I ever had.
If we rewind just a little bit, keep in mind I was just happy at this point to have a job, but if we rewind just a little bit… One day, I’m standing at a urinal, going to the bathroom, as one does, and all of the sudden…
THUMP SQUEEZE SQUEEZE SQUEEZE. “How’s everything going?”
There’s so many witting things that you can think of after the fact, that you could have said or done in that situation, but when it actually happens to you, everything just shuts down. EVERYTHING shuts down. You just stop. You wait for it to be over. You wait for Tom to leave. You wash your hands. You just… cry briefly. And then you remember, at least you have a job.
Метки: The Daily WTF: Live |
CodeSOD: Making Progress |
Whenever a program needs to perform a long running process, its important that it supplies some sort of progress indicator, so the user knows that its running. Sometimes its a throbber, a progress bar, an hourglass, or the infamous spinning beachball of death.
Carol inherited this PHP code, which wants to use a series of dots (&.)
/*snip */
$count = 0;
while ($task) {
/* run the task */
$count++;
if ($count == 50) {
$dots = ".";
if ($dotCount == 2) {
$dots = "..";
}
if ($dotCount == 3) {
$dots = "...";
}
if ($dotCount == 4) {
$dots = "....";
}
if ($dotCount == 5) {
$dots = ".....";
}
if ($dotCount == 6) {
$dots = "......";
}
$dotCount++;
if ($dotCount >= 7) {
$dotCount = 1;
}
}
}
/*snip */
Lets wait and see if the original developer can come up with a better idea
Метки: CodeSOD |
Announcements: Last Chance to Back Programming Languages ABC++ |
As most of you know, this last month I have been running another Kickstarter campaign, Programming Languages ABC++: an alphabet book all about programming.
In the same spirit as Release!, and The Daily WTF, this project focused on the culture that surrounds our day jobs. Specifically in this case, it was all about getting kids interested in what we do.
It turns out that a lot of people were pretty into the idea. We hit our goals in under 2 days, and for the last month have hit every stretch goal we set within hours of posting them.
We still have through Thursday to drum up as much support as we can, so please check it out, and share it with friends.
I wanted to put one last plug here because I am genuinely proud of this little book. I think it will really do its job and help to get kids excited about the idea of growing up to be a developer. Plus, I think it would make a pretty cool coffee table book for grownups too.
Thanks so much,
Alex
http://thedailywtf.com/articles/last-chance-to-back-programming-languages-abc-
Метки: Announcements |
The Software Developers Who Say Ni |
Tim, the Hardware Enchanter worked at a small hardware/software company which made specialized instruments for a variety of industrial applications. When he wasnt busy blowing up the English countryside, he designed hardware as well as its firmware- a mix of C and assembly code- which had to fit into 32KB of program memory with 2KB of RAM. He hardly ever touched application code, and was happy with that arrangement.
The companys next product was The Probe. It was a device for measuring and testing other hardware, and its data went to a PC for further analysis. Tim helped design the hardware and wrote most of the firmware, then waited on the software team to make the controller application.
And waited. And waited.
Finally, he went to speak with the head of the software team, a disagreeable man named Roger. Who are you? the man grumbled, obviously upset at his work being disrupted.
There are some who call me… Tim?
And what is your quest?
I need your software for The Probe so we can finish testing on the hardware end, he answered.
Yeah, well, were busy, Roger said gruffly. That wasnt the response Tim was expecting.
Well, when will you not be busy? We need this software.
Roger adjusted the arrangement of his keyboard and mouse on his desk before harumphing. Listen, those of us who arrange and design applications are under considerable stress at this period. We have a lot to do and not enough manpower to finish it all.
Tim bit back an expletive, Well, put it on your list. Ill throw together something quick to finish hardware testing, but we need you guys to come up with something nice before this sells.
Roger didnt even respond, and got back to the work of rearranging things on his desk. Tim went back to his office and got to work. He wasnt really an application-software guy, but he was able to hack together something with a GDI+ GUI to communicate with The Probe. It was ugly, slow, and crashed a lot, but was good enough to complete the required hardware testing. He moved onto other projects while waiting for the software guys to do their job.
And so he was quite surprised when, several months later, a customer bought The Probe in bulk, and the Powers That Be demanded immediate shipment. We dont even have software written for it yet! Tim protested.
Roger told us that you wrote the software and it was all ready to go.
What? No! Tim was astounded and started shaking his head. I wrote an application to test The Probes hardware interface, but its just an internal tool. Its the most foul, cruel, and bad-tempered application you ever set eyes on!
Does it work with the hardware? they asked.
Well, yes…
Then well ship it. We need this sale. Its Antioch Industries, and once they buy it, everyone else in the industry will be falling over themselves to upgrade, too.
Tim started to protest again, but The Powers That Be turned to the Release team. Go on Bors, they said, Package a release.
Right! Silly little bleeder. One shipped product coming right up.
And so, his slow, unwieldy, segfaulting GDI+ application was burned onto a CD, labeled with sharpie, and packed into a box with The Probe. The kaboodle was shipped off to Antioch, like an unholy grenade, waiting for the customer to pull the pin…
… and when it finally did go off, all Tim could say was, I warned you, but did you listen to me? Oh no, you knew, didnt you? Oh, its just a harmless little piece of software, isnt it?
http://thedailywtf.com/articles/the-software-developers-who-say-ni
Метки: Feature Articles |
CodeSOD: Required |
Managing namespaces in JavaScript presents its own challenge, since the languages default behavior is to start slapping things into window
. For this reason, people have built a number of libraries and practices to solve this problem.
Jareds company, for example, uses RequireJS
to load dependencies, like the lodash
utility-belt library. Sadly for Jared, their new hire proved that all the module-loading libraries in the world dont solve incompetence.
if (_) {
if (__) {
if (___) {
if (____) {
if (_____) {
if (______) {
if (_______) {
if (________) {
if (_________) {
if (__________) {
if (___________) {
if (____________) {
if (_____________) {
if (______________) {
if (_______________) {
if (________________) {
if (_________________) {
if (__________________) {
if (___________________) {
if (____________________) {
if (_____________________) {
if (______________________) {
if (_______________________) {
if (________________________) {
if (_________________________) {
if (__________________________) {
if (___________________________) {
if (____________________________) {
if (_____________________________) {
if (______________________________) {
if (_______________________________) {
if (________________________________) {
if (_________________________________) {
if (__________________________________) {
if (___________________________________) {
if (____________________________________) {
if (_____________________________________) {
if (______________________________________) {
if (______________________________________) {
if (_______________________________________) {
} else {
________________________________________ = require('lodash');
}
} else {
_______________________________________ = require('lodash');
}
} else {
______________________________________ = require('lodash');
}
} else {
_____________________________________ = reqeire('lodash');
}
} else {
____________________________________ = require('lodash');
}
} else {
___________________________________ = require('lodash');
}
} else {
__________________________________ = require('lodash');
}
} else {
_________________________________ = require('lodash');
}
} else {
________________________________ = require('lodash');
}
} else {
_______________________________ = require('lodash');
}
} else {
______________________________ = require('lodash');
}
} else {
_____________________________ = require('lodash');
}
} else {
____________________________ = require('lodash');
}
} else {
___________________________ = require('lodash');
}
} else {
__________________________ = require('lodash');
}
} else {
_________________________ = require('lodash');
}
} else {
________________________ = require('lodash');
}
} else {
_______________________ = require('lodash');
}
} else {
______________________ = require('lodash');
}
} else {
_____________________ = require('lodash');
}
} else {
____________________ = require('lodash');
}
} else {
___________________ = require('lodash');
}
} else {
__________________ = require('lodash');
}
} else {
_________________ = require('lodash');
}
} else {
________________ = require('lodash');
}
} else {
_______________ = require('lodash');
}
} else {
______________ = require('lodash');
}
} else {
_____________ = require('lodash');
}
} else {
____________ = require('lodash');
}
} else {
___________ = require('lodash');
}
} else {
__________ = require('lodash');
}
} else {
_________ = require('lodash');
}
} else {
________ = require('lodash');
}
} else {
_______ = require('lodash');
}
} else {
______ = require('lodash');
}
} else {
_____ = require('lodash');
}
} else {
____ = require('lodash');
}
} else {
___ = require('lodash');
}
} else {
__ = require('lodash');
}
} else {
_ = require('lodash');
}
The advantage to this pattern is that it allows the lodash
library to be loaded into 40 different variables. Thats an advantage, right?
Метки: CodeSOD |
Error'd: You've Been Warned! |
"This warning comes highly recommended!" writes Sean H.
This comment is just a placeholder for the Error'd submission that Dan L. sent our way.
"I spotted an animated advertisement for X server errors in Paris' Gare de Lyon train station," writes Jonathan G.
Yoann writes, "Hmm....Call me crazy, but I think 'catastrophic' might be exaggerating things just a little."
"It seems the folder path for the currently executing application can double as a warning message," Sean writes, "And, it's a yes/no question too!"
"I've been seeing this error for the last few mornings at a local dealership," Brian M. wrote, "I'm worried as to how long it'll take for them to notice."
"It's a good thing gmail protects your average everyday user from having to see all that annoying geeky technical info, like the number 5," Benjamin writes.
Bobbie wrote, "Apparently the newest restaurant in the area has a catchy name."
Метки: Error'd |
The Daily WTF: Live: Building a Better Person |
On April 10th, I hosted The Daily WTF: Live! in Pittsburgh. It was a blast. We had a great crowd, and some great performances.
Seth is a long-time reader of The Daily WTF, and manages to be "all over" the local tech scene. I've met him at a few TDWTF meetups, but also seen him at Code & Supply events. And today's story features robots, so what's not to love.
This episode is brought to you by our sponsor, Puppet Labs. Check out their intro video, it gives a pretty good overview of how they help their customers get things done. Start a free trial today!
FIRST is always looking for volunteers, and if you have the time, it's a great opportunity.
Next week's story is bittersweet: It's our last installment of TDWTF:Live, for now. It's also an explanation for why we generally don't like to run "bad boss" stories- tales where your PHB is TRWTF just don't do much for us here, and that's because I had the worst boss ever. Next week: I'll prove it.
Hello, my name is Seth, and I’m an engineer. Sorry, wrong meeting.
Uh, no. I’m here to tell you a little about why I decided to stop sleeping for awhile. A little bit of backstory, like Remy says… let me follow my notes. So, I graduated with an EE degree in 2007, spent some time in the Navy, and went back to school, got my double-E degree, started working for a defense contract in the Scranton area, and I heard about a volunteer opportunity. They really wanted some people for a robotics competition, so I talked to the guy and signed up for it, and that was my introduction to what’s called FIRST robotics.
I see somebody bouncing in the back, are you… (unintelligible audience member has participated in this event before). So, yes, it’s awesome, right? It’s the best.
It’s a huge robotics competition, started by this guy named Dean Kamen. He’s an inventor, you may have heard of him. He invented the Segway, among other things. He started FIRST- FIRST stands for For Inspiration and Recognition Of Science and Technology- and basically it’s a way to get kids excited about STEM-related fields (Science Technology Engineering and Math).
The first FIRST competition was held in the early 90s, with I think 48 teams in this high school gymnasium in New Hampshire. Dean has an accent you can cut with a knife, it’s awesome. It’s now spread. It’s a worldwide competition, with teams all through the US and all throughout the world.
There are several different layers, levels. There’s one for grade school, junior high, high school, and I work with the FIRST robotics competition which is at the high school level. So, the way the season works, is that every year the first weekend in January the new design challenge is announced. The design challenge is always a game. You have to build a robot to play a game. These aren’t Battlebots, these are machines that are designed to do a repeated task again and again.
These teams are comprised of high school-aged kids, most of them from high schools, but not all. There’s lots of 4-H Clubs, Boys and Girls Clubs, that kind of thing. In fact, in the Pittsburgh regional, there’s a tremendous amount of 4-H clubs, and I’ve heard that 4-H is like a primary educator of STEM in America right now.
They announced the game the first weekend in January, and then the big deal is that you only have six weeks to build a robot. I challenge anybody in this room to ship a deliverable with your company- go back and see, can you ship something in six weeks? Where I work- big company up the road you’d know- we can’t even get the charge code set up in six weeks to start the project, much less deliver something. So in six weeks, you have to put a thing- it used to be in a crate, now they just bag it up- but six weeks to build a robot.
Every team gets a kit. You get a kit of parts that comes with a standard control system, batteries, some other components are standardized. The radio is standard. Then there’s just things like wheels and gears and various pieces, so that any team- I always pick on the 4-H Club from Denango County- a team from a rural part of the country that doesn’t have installed technology base can still put together a robot and enter it in the competition. Put it on the field and get it to count. That’s really what this goal is about, is to get them to that point.
I was a mentor for a couple of years for this team in Scranton- team 1151- and then I got laid off, which was a great career move for me. I ended up here, and Pittsburgh’s awesome. I’m really happy to be here. I didn’t have a FIRST team when I got here, because I’m new to the area. I liked my job, and I liked what I was doing, but I really missed having a FIRST team to work with.
And then I heard, through somehow- IEEE, or somehow- but I heard that they needed volunteers, and I jumped on it. So the FIRST Pittsburgh- Greater Pittsburgh expanded- regional competition- that year that I went it was at The Pete [Petersen Events Center, at the University of Pittsburgh] but now they do it at Cal U [California University of Pennsylvania]. I was assigned to be a judge as a volunteer. The judges have a unique role, in that they go around and evaluate the robots for non-game criteria. Things like technical excellence and so forth. I worked with another engineer who was a mentor of team 2051- every team has a number.
Much like Homer and the Stonecutters, they’re assigned a number in the order in which they joined. I worked with 2051 which is the Beattie School, Beattie Career Center, in Allison Park. It’s a really cool school, and if you ever get a chance to get a tour of it, or know someone who’s interested in a career and not ready to go to college, consider sending them there. They have all sorts of career options schooling- a culinary program and stuff.
The program that we worked with, mostly, was their advanced manufacturing program, where they teach kids how to do things with electronics. Or 3D printers- they have three 3D printers in their classroom. They have a FANUC Industrial Robotics Arm, and they have all this kind of modern manufacturing equipment, that a kid would see when they go into the industry. It’s really helpful for having a robotics team, and you’ll se the comparison that I’lll get to in a minute.
They have a base, an infrastructure, tools and soldering irons and multimeters and the things you need when you build a robot. They know how to do 3D modeling and will actually model up the whole robot in 3D and figure out the dimensions that we need.
The no-sleep part: I hear through the grapevine, that there’s a new team in the area, and they need some help. Turns out, it’s a team at a new Catholic high school in the Cranberry Township area. Someone had set up a team there and needed some help.
Now, I got the message about them needing help about 2.5 weeks into the build season- remember it’s a six week build season, and they’re 2.5 weeks in and now asking for help. I went over there, and got in contact with the teacher. It’s a brand new building, very impressive, shiny and nice. I walk into the classroom where the teacher comes and meets me. What do I see? Nothing. They don’t have tools. They have some robot parts kind of scattered around there. They don’t really have anything. It’s 2.5 weeks and they should have a chassis, they should have something. It’s a short build season.
I see one of the students, Matt- he’s holding a piece of stock that you would buy from Home Depot or something, aluminum stock. He’s got a hacksaw, and of course, he’s not wearing safety glasses, he doesn’t know any better. It’s a big deal! You’ve got to wear safety glasses if you’re working with tools.
“Hi,” I say, “I”m here to help. What are you doing?”
He says he’s trying to fabricate a key, because they have a motor with a shaft on it, and they want to put it in the gearbox to hook it up to the drivetrain, but it lost the key.
“Well,” I said. Okay, what goes through my head immediately, is, Y’know, I’ve been a mentor for several years now, and a judge, and seen a lot of robots, and I know the process and I know what it takes to get it done, and these guys… they can’t not see the forest for the trees, they can’t see the tree for the bark. They’ve got their head smooshed right up against the bark. They are so far in over their heads that they don’t even know what they don’t know.
“Okay, don’t worry about the key right now. We’ll buy another one if we needed it. Stop- we need to talk about the design, we need to talk about what you’re going to do. How are we going to build a robot in the remaining time?”
I gather them all up, and say, “What is your design? What do you want to do?”
“I don’t know… build a robot?”
Okay, great. I had this moment of clarity. I realized that they’ve sort of taken on this quest, and they don’t know what they’re going to do, how they’re going to complete it, and they need somebody who’s going to tell them how to do that. And that has to be me. Which is kind of, y’know, you think about that, and whoa- that’s a lot of stuff.
In the movie version, I’d like the movie version of me to say something clever. Something that Yoda would say, or Obi-Wan, but no- I just kinda went, “Well, we’ve got a lot of work to do, so let’s get to it.”
So, six weeks. I can’t stress- six weeks goes by in a blink. You blink and suddenly build season ends tomorrow.
I touched on being a judge before, and still every year I’m a judge. I’m a mentor, but I’m also a judge. I’m a mentor for my team, and the competitions are a three-day affair, where Thursday is always when you go in and get it inspected and test it out and practice. Then Friday and Saturday are the matches. Friday and Saturday I’m a judge, I run around and evaluate other robots. Of course, I can’t evaluate my own team, but that’s okay- there are other people to do that.
One of the things we talk about as judges, and why I bring it up: we really want to emphasize that the robots that succeed in other criteria, like control systems, or industrial design, we want to make sure the students are the ones driving that design. The adults are there to help. As a mentor, they’re there to make sure the kid doesn’t cut off his hand or poke himself in the eye. Make sure they stay safe and guide them, but the students need to be building the design. They need to be the ones that are making the robot.
As a judge, you go around and talk to them and say, “Tell me about your design,” and they say, “We kinda worked…” and then they sort of trailed off, and you realize the adults over here, they’re the ones that built the machine. That’s okay actually, that’s not wrong in the rules sense. It’s wrong in the spirit of the competition. There’s nothing in the rules that says the adults can’t build the robot, but it’s against the spirit of the competition. As judges, we don’t want to reward that.
There I am, at this school, thinking to myself, “I don’t want to be the one to tell these kids how to build a robot, but on the other hand, we’ve got a few weeks to do this.” So I compromised. I pulled up a YouTube that my Beattie team had been using for inspiration. “This is a simple design for a robot, and this is something we can do, and we can do it four weeks. And let’s do this. I want you guys to watch this video, figure out what they did, and let’s talk about it and design a robot.”
That was my compromise in how to show them what to do without actually telling them what to do. I think we were successful, because, spoiler: we did build the robot in the end. I realized, too, that in order to get this done, I’m going to have to be there every day. This is sort of a moment of clarity thing, and this is when I decided I didn’t want to sleep anymore. I immediately shifted my work schedule, started going in to be at my desk at 6:00 in the morning so I could be out of there by 3:00, so I could be over to the school by 3:30, because the build session was 3:305:30, 6:00 o’clock.
So I’m getting up- did you know there’s a 5AM alarm setting on your alarm clock? I had no idea. It’s crazy.
One of the big challenges we have, aside from the fact that we’re 2.5 weeks in, was that the school didn’t have any shop facilities. And of course, the students didn’t have anything. So, how do we fabricate parts? We have a kit of parts, we have the chassis, we’ll eventually put the chassis together, but now we need the rest of the infrastructure to support. This year’s game was a box-lifting thing, we had to stack these totes- we had to make a thing that would lift these totes. We had an idea of how to do it, but how do you get there? How do you fabricate it?
The teacher I worked with had been an instructor at the Pittsburgh Aeronautics Institute, or the Pittsburgh Institute of Aeronautics, I forget which. She had a good relationship with them. And they agreed that, if we brought them material, that they would fabricate it. Drill holes, or weld pieces together, or cut pieces, whatever they needed.
Those problem- one, the kids didn’t know anything about technical drawing or technical communication because they’d never been trained or seen how to do it. And the second problem was that there was a 3-day turnaround. If we decided that we wanted to cut a piece of aluminum to this length- and usually the kid would say “this length”, he wouldn’t say, “48 inches”, he’d say “sort of this length”- and we’d have to give it to the teacher, she’d take it to other school, they would fabricate it, and that was a 3-day turnaround. That was 3 days to figure out that, “No, we actually wanted it this length.”
We’re running out of time. We’ve got a week left. Here’s what it took. We finally got it done. It’s February 14th, Valentine’s Day, it was a Friday. The Build Season ends on the 17th the Tuesday following. We have most of a chassis, we finally got all the components in, they had sort of been trickling in. A lot of the major metal had vanished in the mail, so they re-sent it, and then the other stuff showed up, so we had extra, which was fine.
We had all this stuff, but then we said, “How can we finish this?” It turns out that one of the students, his uncle owns a chrome metal shop in Evans City. Paul’s Chrome Plating, I looked it up to make sure I got the name right. I would describe it as, they do, “Handcrafted, free-range, organic artisanal chrome jobs.” It’s like a hipster chrome shop. Not quite- they’re in Evans City- but they do small batch. They’re not a mass producer. They do one-off kind of thing, you’re redoing a ’57 Chevy, and you need a part, they’ll do it for you. If you need any chrome, go to them, because they’re awesome.
We got there. Students, everyone arrived about 3:304:00. I got there about 4:00, they were there about 3:30. It’s me, the four students, a couple of the mothers, Paul and one of his buddies/employees- I’m not sure- and myself. One of the kids said, “We’ll be done by 7:00,” and I’m like, “You have no idea.”
Midnight. I left at midnight. And that was really the point where were all just, “We can’t stay any longer, we’re all tired.” I mean, Paul owns the place, it’s his business. He can stay all night, he doesn’t care. He’s having a good time. The kids are tired. We have stuff going on the next morning, so we have to do something. It’s midnight, but we got it built. That’s the important part, right? We finally got it. The majority of the chassis, the majority of the structural elements mounted to the chassis, we got all of the major components fabricated. We had to do a little bit more assembly on Saturday and Sunday, but we got everything we needed to get built in an industrial environment built. 8 hours. I was there for 8 hours of sheer GO. But it was so awesome, because the kids who were there finally got the experience of actually over the course of a few hours taking a piece of just steel or aluminum and turning it into a thing, and actually seeing their design come to life, and actually seeing how we mocked up and talked about it and how it actually comes together. It was just so cool, they were so excited to see that actually work.
Actually giving them a drill, this is how you’re going to drill it and put a hole here and here and okay, what about here? The whole process, it was just so awesome.
To top off this epic evening, as I was driving home, and of course it’s bitterly cold, really snowy, so I’m going ten miles an hour. I put on the radio, and discover that WESA carries Bullseye, which is a show I really like. Then they had a show of a style of music that I really like, and it was a perfect capper for this lovely evening. At this point, I knew we going to be successful, I knew we we built the robot, we were going to be able to enter it in the competition, and that it would meet the criteria of success, which is to bring the robot to the field.
I guess in general, to wrap it up, that’s kind of why I do FIRST. I’m normally a pretty cynical, sarcastic, world-weary sort of fellow. When I’m there, that frenzy of the build season that’s six weeks, then the pits as a judge talking to all the different students, and listening to these kids tell me about the fantastic time they had figuring this really thorny PID issue that they had, and they had to tune the constants or whatever.
I can’t help but want to be better. It actually makes me better. It makes me less cynical, less sarcastic. I’m more open and more friendly, and that’s why I keep coming back. That’s why I do it.
So, thanks.
Метки: The Daily WTF: Live |
Announcements: Sponsor Announcement: Infragistics |
A few months back, Alex announced our sponsorship program. This has been a great partnership thats helped us bring you our regular content, but also special features like TDWTF: Live.
Were proud to introduce our second sponsor: Infragistics
A worldwide leader in user experience, Infragistics helps developers build amazing applications. More than a million developers trust Infragistics for enterprise-ready user interface toolsets that deliver high-performance applications for Web, Windows and mobile applications. Their Indigo Studio is a design tool for rapid, interactive prototyping.
Infragistics tools allow you to create rich desktop apps in WPF or Window Forms, responsive Web apps in HTML5, JavaScript & MVC, and native mobiles apps for iOS, Android and Windows Phone. Their products are used by companies like IBM, Intel, AT&T and ESPN. Later this year, well do a deep dive into their products.
Thanks to the support of Infragistics, were going to be able to bring you some exciting new content, arrange more meet-ups, contests, and have more fun all around. To build amazing apps of your own, download a free trial of Infragistics Ultimate today. See for yourself why they're considered the worldwide leader in user interface and user experience development controls.
http://thedailywtf.com/articles/sponsor-announcement-infragistics
Метки: Announcements |