Tuesday, November 18, 2014

OS X and Power Input Status From the Command Line

The other night I was getting ready to head to my apartment when a tweet from ConEd, the power company, said that several residents near my area were reporting a power outage.

While ConEd charges, in my opinion, way too much, and their website tends to leave something to be desired, they do at least have a site that charts power outages. I confirmed that yes, the address they tweeted was near my apartment. Then I swore because I was planning on recording an episode of my podcast and a power outage would be a real pain to deal with; do I travel an hour to get back to the apartment and risk the power being out, or do I wait and record at the office and end up getting back really late at night?

I then wondered; my laptop is connected to the wall for power. What if it could tell me if it was on AC power? Just being able to connect means nothing. I have a small UPS connected to the router and cable modem, and the laptop battery will keep the laptop going even if power were out. But it turns out OS X can report whether it's on battery or AC power.

From the command prompt I ran:

pmset -g batt

Now drawing from 'AC Power'
-InternalBattery-0 100%; charged; 0:00 remaining

And there it was. My apartment still had power! How handy!

Sunday, November 9, 2014

Conversation by Meme

Wikipedia defines a "meme" as "an idea, behavior, or style that spreads from person to person within a culture."

I've noticed a trend in people's communication habits that I called, for lack of another term, conversational memes. Terms that act as shortcuts for larger, more complex concepts, often nuanced, only used ad-nauseam until their use (and in some cases definition) become distorted and are triggered by other conversational memes.

To be fair most of these trends seem to be centered in social media sites like Twitter, where there are a contingent of people who steadfastly cling to the notion that nuanced conversations can be had in 140-character hurled chimpanzee turds. While I have no doubt that there are people who have had productive exchanges on Twitter, there are far more conversations that quickly degrade into irrational thinly-veiled attempts to establish dominance in who is more righteous than right.

While I have seen examples of this used repeatedly, a particular exchange got me thinking more about the phenomena.


I have re-read this short bit of exchange several times and I'm afraid I still can't understand the use of "mansplaining" in this example. Mansplaining is supposed to be "(of a man) explain (something) to someone, typically a woman, in a manner regarded as condescending or patronizing." Was Ishan being condescending? Or even talking down to her? His experiences echo my own; I have not had widespread failure stories come to my attention aside from bluetooth and wifi issues. But somehow suggesting that she may have an edge case on her hands is "mansplaining," and she knows better because she's a software engineer.

Was she right about the buggiest mess? It's certainly an opinion, but anecdotal. I've not encountered huge problems running Yosemite. My users haven't been overly vocal about general problems with Yosemite. So it seems perfectly natural to suggest that someone having many problems is experiencing an edge case. If anything, I've seen more weird shit from systems belonging to technical people because they like to screw around the with the system configuration more often than regular users. The assertion is made that this was simply inaccurate, but there's no information backing this up. (I know, people hate to be told they need to back up the assertions they make, it makes them a victim, it's victim blaming to ask them to show evidence to back up a statement...)

I went to Twitter and asked about the use of "mansplaining." I only had one response and it was from someone saying they've never had someone give him a good (or consistent?) definition. Which would fit in with my biased observation nicely...mansplaining, like so many other terms, has devolved to a word triggered by "this person appears to be male and is expressing doubt in my claims." This triggers the response of "mansplainer!"

Not only is this unhelpful but it also destroys the true use of the word. In order for something to be attributed to "mansplaining" you have to have to have an understanding of the motive behind the alleged mansplainer. Somehow this term is thrown around an awful lot when based on a 140 word brain fart.

But perhaps I'm basing this on a position of privilege. After all according to this website checking one's privilege, "roughly speaking, ["check your privilege"] is a way of telling a person who is making a political point that they should remember they are speaking from a privileged position, because they are, for example, white, male, heterosexual, able-bodied or wealthy."

Privilege as a term was once again tossed into my Twitter feed when Richard Dawkins mentioned an article discussing three professors launching a "Check Your Privilege" campaign that specifically wants white, heterosexual, able-bodied, Christian or male individuals to recognize they have "unearned access to social power based on membership in a dominant social group."

"If you don't have to think about it, it's a privilege." 

I'm not quite sure what this campaign aims to do. The criteria overlaps so much of the population, it's almost ridiculous to claim that you're not, in some way, privileged. At best it's a reminder that when you speak, your perspective may be colored by your life experiences and position in life. It implies a criticism of who you are...but by definition you didn't do anything to put yourself in that position. But the more I read that article, the more it sounded like someone reminding everyone that they have something better than someone else. "Buck up! Don't be sad! At least you're not like <points out someone less fortunate>!"

But like mansplaining, privilege is a word thrown around by trigger words and criteria. Basically your statements are irrelevant if you are speaking from a position that is different than the person offended. They may even accuse you holding a particular viewpoint because you're entitled.

"Entitled: to give (a person or thing) a title, right, or claim to something; furnish with grounds for laying claim." Most of the meme-users seem to prefer accusing people with the Google adjective definition of "believing oneself to be inherently deserving of privileges or special treatment." When used in memesque conversation, however, entitlement is a way of accusing someone that that person believes that have some right to do or say something. It's a small but critical difference; the word is thrown around so often that it basically means you dared to think you were allowed to do something. 

The difference is the distinction between feeling you have the right to happiness versus a right to pursue happiness. To the people flinging the word around meme-space, it makes no difference, and it makes no practical difference to them. The very use of the word is something meant to break the conversation into an ad hominem accusation or question of your motives. Your argument is not to be heard not because it lacks merits but because the source is somehow tainted.

At that point you're derailing the conversation, another phrase bandied about freely.  The definition of derailment is to take a conversation about a particular issue and instead guiding it into a separate, only tangentially related subject. If you bring up something that as a topic intersects with the subject, however, you'll still be accused of attempting to derail a conversation. In many cases of meme-use it is tossed at someone questioning anything from the offended party. Asking a question they don't like is a free license to marginalize you for derailing rather than addressing the question or point.

All these and more, in social media circles, are triggered by keywords and attributes. If these triggers (which itself is another memeword...TRIGGER WARNING!) are used, they are then replied to with another keyword, and the conversation becomes a dance from an impromptu script comprised of unhelpful meme exchanges. Avoiding the use of such memes and perhaps...perhaps...you can get an educational exchange. Otherwise, the best way to share your perspective as well as gain insight into other people's experiences is through a medium that allows you to at least attempt to explore a nuanced topic in more than 140 characters.

If you have a comment you can try mansplaining why I'm wrong in the comments, but I warn you that you are probably trying to derail the conversation with your entitled and privileged views. Although at this point it is far far simpler to stop trying to keep up with the latest reasons why everyone is horrible and just try not to be a bad person yourself, because believe me, no matter what you do, someone will be offended and find fault with you.

Sunday, October 12, 2014

Athens Area School District, Propaganda, and Going Too Far

UPDATE - The school...over the course of the last 2 hours...pulled the front page!
**********

I'd like to think that when organizations grow larger a certain amount of dysfunction emerges. Hopefully when mistakes are made the organization tries to fix them and take steps to minimize repeating them in the future.

But some mistakes make you sit back and wonder if they even see them as mistakes in the first place.

The Athens Area School District, like many other districts, are in the middle of contract negotiations with teachers and staff (although for the rest of this post I'll refer to them collectively as staff.) teachers have been working for a few years now without a new contract, and the board has, in several cases, refused to talk with them. It's a pretty typical game that gets played out (although I find it horribly irresponsible of a board to even allow staff to have a contract term lapse, then have a pretense of an interest in professional behavior. But that is simply my opinion.)

As the non-contract-negotiation-period continues to drag on there tends to be an escalation in pressure tactics. Meetings are held in auditoriums for "informing the public". Editorials are published in the local paper. Today the public gets to share their half-formed opinions on newspaper websites to parrot displeasure in the existence of unions or the unfairness of benefits a union-backed group negotiated for staff in the past.

Same song, different band, played out every few years. Usually conflicts get worked out (eventually) and teachers go on teachering and support staff continue supporting and the community continues to disapprove of their favorite sports team generating babysitting service.

Did I word that in a way that you can infer how I have felt about public schools or the attitude other people have towards them?

Maybe. If you have reading comprehension skills.

Sometimes this is done on purpose. It's a way of using bias to spread a particular viewpoint. Some call it spin. Some call it framing the argument. Others use the blanket term "propaganda," and it's a skill that can be highly lucrative for people in public relations. When this skill is poorly executed, the spin is not only obvious, but insulting to the target audience.

That is what makes this latest escalation so horrifically terrible on so many levels.

(DISCLOSURE - yes, I have family working there. No, I don't get information on what's going on beyond things that affect work schedules. I've had family and friends of family working for various school districts in the area in positions ranging from custodial staff to teachers to principals, and I pay way too much in taxes to a school district as it is. I've seen the contract negotiation rodeo dance many times in my life. I've become familiar with many of the tactics used when groups drag out negotiations. I've stayed out of this back and forth mud slinging...it was routine, as far as I knew, and I got information everyone else got through local paper headlines. But this...well...this was more than a basic attention grabber, and quite frankly, it moved me to do a little more digging. These are my words. These are my opinions. If you accuse me of parroting or speaking for someone else, you're insulting and implying I'm incapable of...or don't have a right to...having my own opinions.)

On October 10th the students logged into the school computers and were greeted to a press release "in response to" an article in a local newspaper. I hadn't seen the article, or if I did I don't remember it...I've long grown numb to the whining of salaries and benefits and assurances that the board is just trying to keep taxes down and there's no money blahblah. But the content of this press release tells me it had something to do with salaries of administrators with a dose of healthcare costs tossed in for good measure.

Blanked out phone number. I want to illustrate what they saw, not be petty or childish...

Think about this for a moment. The students were greeted with a message about salaries, how expensive the teachers are, and it was in the form of a rebuttal to an article that the school didn't link to for information.

That in itself is a subtle message. It says the administration, and/or the school board, has no respect for their staff. They couldn't keep mommy and daddy's fighting behind the closed doors of newspaper articles or their own websites, or even documents available from links on the school website...they made it a top page, in your face article for students to see when they first log in to the computer and open a web browser.

Keep in mind that teachers are ROUTINELY hammered in evaluations for a thing called classroom management. Do you think having other adults...teachers bosses...sending a message that they don't respect the teachers helps teachers maintain respect and order in the classroom? Even if the effect is subtle, it'll contribute to a further inability to properly maintain order in the classroom.

I'd be horrified as an employee to see this. A tacit reminder that my employers hate me. Front page. Not bothering to hide it anymore. And most teachers keep their thoughts on such matters to themselves because who would they talk to? The people in a position to help are the people who appear to be actively setting them up to fail. Since this appeared on the school website, that would mean at least it was endorsed by the administrators and was an extension of the ongoing arguing between the union and school board.

Worse, the bias and bullying is simply obvious.
  • It's placed on the front page of a website that is set by default to come up on computers in the classroom.
  • In the release's own words, certain salaries were released "because the administrators have graciously agreed to share those figures and the district feels it is important information for the community at large to have." That implies this is special information pried from their cold dead hands. Hate to tell you but such state secrets are literally available from the state. Public employee salaries are publicly available. A quick visit to OpenPAGov.org will give you all the salary information. It is generous to say characterizing this otherwise is only disingenuous.
  • Numbers, numbers everywhere. Numbers are funny things. Any decent statistician...or presenter dealing with numbers...can tell you that they can be bent to show just about anything, especially if your audience is not versed in critical analysis. Much of the presentation documents frame salaries as "number of professional staff earning greater" and salaries on a table for position wherein many are filled with N/A (you didn't have a superintendent that year? Or you are focusing on a particular person?) and there is a mention of staff being paid more than others in the area. You don't give those numbers, though. I can say that in NYC public school janitors make over $100,000 on average.  Wanna keep playing "we need to pay what others pay" game?
  • In addition, the numbers are usually veiled to hid other details. Ask yourself...why are there so many percentages in one list? When they add up to 515%, you should probably stop and think about what it's really measuring and how they're used to possibly distort a point. (Hint...percentages are supposed to add up to 100. If they don't, something else is being measured instead of parts of a whole.)
  • It says it's in response to a press release in the newspaper. Why isn't it linked to? Or reproduced, so I know what exactly you're talking about? It's a press release. I would think they wouldn't object to having the text reproduced or linked to. Unless you don't want people to see it.
  • The article says information is available to the public on their own website. The website I'm reading it on. The website in the URL. Why didn't you just...I don't know...say it's available here. Not re-state the website URL. Worse, it's not restated as a link. It would still be weird, but it would show some effort for the medium on which you're writing.
  • It's interesting to note that in this format there's not a place to respond. No comments enabled. No contact information or author taking credit for the information. Who wrote it? Who do I write to if I have questions? The change log is publicly accessible, but the person listed vehemently denied having anything to do with the content he posted.
  • I like the use of terms like "Cadillac plan." Is that the technical term? Or is it used because it stirs up imagery of indulgence and negative connotations? I'd be interested in knowing if that is the proper term for it given that Cadillac, I thought, was a legally protected term.
  • The cuts in numbers for healthcare. There seems to be an implication that you want to drastically cut what the employees get. I suppose some of those savings are going to be given to the employees as part of their salary? After all, several employees are already opting out of your healthcare plan and instead going on their spouse's healthcare plans. Do your numbers reflect that in what you're feeding to the public, the number of insurance buyouts you have and what is saved in that process?
  • I also like the end implication of school staff not being community members. Do you have numbers on how many of your staff aren't living and paying taxes in your district? How many of your staff are shopping in your district, paying into the people who in turn pay taxes to your district? What is the definition of community member? Because it might be nice to not have people staying to host and chaperone your proms and sports events if they are somehow considered "not community members." Let them go home instead of contributing to events for your community members.
  •  Ooh! I did find some numbers for other districts in a separate presentation graphic from your public presentations. You made it easy to find (given you didn't give a link or discussion in the text so I had to search around your other material.) The graph used a technique I was recently acquainted with by a graphics designer friend from work. That bar graph looks REALLY big, jumping from $42K to $50K for average starting salary with a bachelor's degree! Although the survey of schools...what schools? What is the cost of living in those areas? And the vertical axis...was there a reason the spacing was chosen in increments of $2K? And the size of the graph must have made the difference look HUGE on the projector. In the future you can use $1k increments to make it look even bigger, if you keep the same spacing between lines.
  • Why was that chart in a link called a collective bargaining report? It was just a slideshow. Who made it? Did the union have a reply to this or input on the information?
  • How come all the reports are slide shows? I was under the impression a report was usually in the form of words. Lots of words with information. Margins. Graphics interspersed occasionally to illustrate a point. These reports in the form of town hall graphics. With big fonts. And no text explaining what was said in the town hall, hopefully elaborating on points. Was there a prepared speech, or were the slides just read to the audience?
  • Another reason numbers, numbers numbers are fun? I'm totally zoning out after the third chart. I don't know what it's trying to tell me other than "we have lots of numbers." How is it relevant except to overwhelm you with information that may or may not be relevant to the point? Does anyone actually explain what is happening in these negotiations in terms not meant to obfuscate?
  • Is the union going to get a chance to reply to this press release? Or is the school only allowed to show one side of the argument, the one that makes the person in the front of the room look bad?
  • According to the agenda, the meeting appears to be...the school board. So the school board gave the presentation to the public? Is there an equivalent set of information available from the union, or is it only the school board that determines what information the public should know about and be given a voice on the school district website?
  • I also see that in your agenda you had a lawyer give the status of negotiation talks. There is a lot of talk about how much staff costs, and how much effort is going into saving money. How much is the lawyer costing the district? How much are stalled negotiations costing the district, on average, per day, and how much have they cost so far?
  • Did the lawyer create your slideshow materials? They don't really have authorship information or contact information. But I saw through a quick search that the lawyer named seems to have extensive experience...and relationships...specializing in negotiations with many many public schools in the area.
  • Is there a reason contracts were allowed to expire and drag on this long so that retroactive pay is even an issue? Isn't that someone's job, to actually have contracts negotiated and renewed before they are due? How many people "in your community," as contract workers, would keep working without a valid contract? Is someone not doing his or her job, seeing as the teachers and staff have continued providing services to your community without a valid contract?
  • If a union is a group of individual workers working together to have a collective bargaining unit, someone to represent them and work for a group's benefit, while the board is often cast as the plucky community representatives trying to work in the best interest of the community, where does it fit in when your lawyer's name is attached to several districts with recent or ongoing contract negotiations? It didn't take much Googling to see that his name is attached to other school district work (just Google his name and a school district)...and that would make him privy to information among those bargaining units, I would think. And it's no secret that districts rarely want to be the first to do anything...they tend to make decisions based on what their neighbors do (Ah, fond memories of watching school winter closings...we knew that if a particular district closed, there was a 90% chance our district would soon be calling school as well...) So does that kind of sharing information kind of make the board working in a "psuedo-union" capacity?
  • The self-imposed battle lines seem to be drawn between the community and the union. But upon digging, I have been seeing more services being outsourced to other companies. Is it a little strange to give jobs to companies that aren't community members, sending dollars outside your tax base?
These are just thoughts that occurred to me as I read the information being forced into my face and the links to what were labelled as reports but actually were presentation materials. I didn't get into other subtle means of manipulating the public, such as...you really had security show up for the public meeting? What subtle message did you want to send, that you hired thugs and criminals to educate your kids, and needed protection from your own staff? And how much did the taxpayer crusaders protecting community wallets pay for security on top of a lawyer, who is not a local lawyer nor member of your community, to travel up to the district for a presentation?

Does anyone bring up what contributed to the district being in a position where there are so little funds, or take responsibility for decisions leading to this point, or is the accepted attitude that these things just sort of magically happen in a vacuum? Because as a lesson to the students, that...is wrong.

Using the school website as a tool for forwarding a biased agenda...is wrong. 

If you had a separate section where you can both air your grievances and explanations and give an equal voice to both sides, that would be one thing...but putting a press release...with obvious biases against the people in the classroom, members of your community educating your kids, from one side of the dispute...is wrong. 

The lessons this teaches kids about how to handle disputes...are wrong.

The toxicity of what this says to your staff through implications of a total lack of respect and value in the classroom...is wrong.

Placing such material as a tacit agreement of negative attitudes towards your staff on the part of the school board and administration, knowing that your staff can't say anything about it or have a chance to reply without fear of retribution...is wrong. And you should recognize that from the messages barraging your students through the use of your ongoing character programs. It's bullying.

What should be done is removing that material from the front page of the website. If you want to make it an outlet for "informing the public", make it a link to its own page. And give equal access to hear from the unions. You don't have to let public comments in...your prerogative and probably a bad idea if students are reading what is published. This should be presented with a pretense of professionalism despite the disagreements.

This kind of bias and bullying is something I would sooner expect on a playground. Not from the people holding school staff to a higher standard.

It's strange to constantly hear about "Athens Pride." It's a slogan on their shirts and banners. Apparently it's only a slogan, though. What do your staff have to be proud of? A community that hates them? A leadership that despises them? A job where their authority is undermined, then they are judged in part by this same professional sabotage? 

What effect do you think it has when your staff are teaching kids in an environment where pride is simply a hollow, meaningless word to be slapped on t-shirts? That there's no effect whatsoever on morale of students if you make your staff feel whipped, undeserving, and overprivileged despite the effort they put in, often above and beyond the terms of their contracts? (Although it's hard to make a case that the contracts are worth much when they can't be given the courtesy of having contracts negotiated in a timely manner.)

(Afterthought...normally at this point a third party is brought in to arbitrate with fact finding. Funny how I didn't see anything about that emphasized? Because there was a third party brought in. The report was rejected. Why? I don't know. But the report itself is public record, if you go digging for it yourself. Why wasn't that in an announcement with explanations for why it was rejected?


Tuesday, October 7, 2014

What I Learned About Functional Specs And Mockups

We've been having discussion in our department regarding workflow, communication, and automation. There came a point in these discussions where I described a system that I thought would make things simpler for us as a group with an interface that we and new hires alike would find useful.

I thought I was describing it eloquently. But then again, I knew what I was describing.

But there are other practical obstacles to communicating such ideas. For example, your team may feel they have better things to think about. Maybe they are biased towards their own ideas, or that this is a waste of time because dammit the current system works fine if only you weren't whining so much, or whatever their mind has wandered off to at that point of the meeting.

In the end the boss decided to steer the meeting by relenting to a "write something up and work with <coworker> on this, we'll discuss it after that" approach.

I should back up a little bit here...I'd grumbled about a lack of documentation on the state of the in-house project growing in our department for awhile, but because grumbling isn't seen as productive, I felt the concerns were dismissed. What I later understood was it wasn't a lack of documentation so much as a lack of a functional specification. Others on the team didn't understand the problem until we were in a meeting and three people had three totally different ideas on how the system did something. Because the application was in a functional state, there wasn't a problem seen. It was doing things, right? No alarm bells, nothing broken...move fast and break things then fix them later. Whiners were just falling behind.

Observation One: Functional specs aren't necessary to have a "working" system, but they can keep people on the same page.

Maybe that works until it dawns on everyone that what they know is wrong.

"But you're not describing a functional spec," you might say. "How a system does things is a technical spec!"

That's true, but sometimes the how something works affects the user interface and interaction...in this case there are ways of doing things that the system may mysteriously change behind your back without notice. That's an interface interaction that ideally is covered in both a technical and functional spec. The proper workflow should be baked into the functional spec.

The immediate reaction...thinking this is a documentation issue...was to have people document how the system worked. Which isn't bad to have for reference. But it's a band-aid; a reaction rather than pro action. Reading it didn't give me a sense of what the end product was going to do or how it would fully address the future integration of automation...it was a snapshot of what had already been done.

In a way, it was kind of a postmortem.

Observation Two: Documentation is a blanket term with many sub-categories. Sometimes you have to identify what kind of documentation is missing before identifying that as a problem.

I spent some time reading up on functional specs and pondering how I would approach the problem. Turned out I knew someone who had written some nice introductory material on functional specs freely available on the Internet.

At its heart a functional spec is a description of how an application is expected to work with the users. It describes, in detail, how the application works with the user.

I then started writing. You would think this is easy. You would be wrong. Maybe if you have a really clear idea of every bit of the proposed application in your head coupled with experience in writing specs, you'll find the task easy. Chances are you'll find that clear idea of how you want to interact with and configure the system is just a set of highlights you expect in a working system. You don't realize the number of things you just don't think about or take for granted in a system that a decent spec calls for you to spell out. ("Oh...yeah...logout button? Or a logout link? Is it in a menu?")

Observation Three: The Functional Spec was longer than I thought it would be.

This was a relatively simple web application, or so I thought. Then I started describing the pages I had in mind.

One thing led to another which led to another. It didn't take long for the first draft to hit 15 pages.

Observation Four: Mockups make specs come to life, and bring out glaring errors.

I thought the mockup was best for presentation purposes. The spec tutorials heavily rely on humor for keeping people engaged enough to slog through the details of what I think a website should look like. As you can guess, I'm not really entertaining enough to keep my team reading my proposal.

A mockup, however, is a picture worth thousands of words. After I completed my first draft of a spec, I pulled out a copy of a mockup application called Balsamiq. I had never used it before and dreaded the learning curve; fortunately, the fears were largely over nothing. It wasn't long before I had the initial pages staged.

I also discovered several places where my descriptions, so clear and useable in my head, were simply impractical or felt wrong once they were applied on the mockup. In other places I discovered redundancies in function that overcomplicated the workflow. Trying to map this in my head from words on the page didn't quite work; the pictures illustrated what turned out to be glaring errors, and when I went back to the page on the spec, the errors on the written page were such that I could not unsee them. Doh!

Other times I discovered ways of doing things better on the mockup that didn't occur to me on the written spec. More notes were scribbled down for future reference.

Observation Five: A good mockup program can make a good presentation tool.

Mockups are new territory for me. I never had a job where spending time on a mockup of an application would be potentially useful. It turns out that Balsamiq is more than Powerpoint for interfaces.

I discovered that this program allows for linking pages together, a natural display of features for mocking up a web application. I can also export the pages to PDF and it looks like those PDFs will be interlinked as I set up the mockup project. Balsamiq also allows for the use of comment notes that can be hidden, describing features and workflow within the mockup itself. If my functional spec weren't so wordy, and if there weren't some features and description that aren't really illustrated in the mockup, I'd be tempted to just dump the functional spec text into a series of comments in the mockup and forego the use of the separate functional spec altogether.

Observation Six: The mockup has given me more notes for the rewrite of the spec.

Aw, dammit...more writing.

The first draft of the spec was a page-by-page description of the web application. After seeing the pages illustrated, I now have many notes scribbled on post-its and in the margins of a printed copy of the spec. Now I have to go back and re-write parts of the spec.

The first draft isn't horrible, if I do say so myself. But it if I am to present this to the team, it needs to have I's dotted and T's crossed, and it needs to be in line with the mockup.

There will no doubt be mistakes. That's no excuse to not try fixing errors.

Observation Seven: Order of dependencies matter, as does the ability to reference information in the spec.

This is something I learned about in a Ruby talk about communicating with developers. It's meant to be a good practice for giving presentations, but I think it also makes sense in certain types of writing.

In a technical description, you should not have a dependency on something later.

That is to say, if you're talking about something technical, you should avoid whenever possible a situation where you describe something but "if you don't understand X, it's okay, we'll get to that in a bit." I'm sure you've run into that before; I know I've heard it. In the talk, the presenter said that he's given his thesis statement, the most important bit of information, as a "header" to the discussion. If the attendee fell asleep at some point in the talk, he would already know the idea that the presenter thought was most important, and in the process of the talk there were little to no loose ends.

As I go back through the spec I'm going to try keeping an eye on my descriptions to see if they need to be rearranged a bit for clarity. I'll bake in descriptions when necessary and minimize references to other spots in the spec; that way if I eliminate sections or change how something on a page works it won't make another spot reference a non-existing bit of information.

I'm also going to try making the spec referenced with a table of contents, so pages and sections can be quickly searched even if printed. A spec is a living document. If you can't easily navigate it as it grows, it won't be useful.

Observation Eight: Specs and mockups can become a skeleton of a user manual.

The more I wrote and the more I illustrated, the more I saw the beginnings of a user manual for an application take shape. It makes sense...if a functional spec outlines how a user is supposed to interact with your application, and it describes the expected behavior of the application, well...that's the basics of user documentation.

This documentation...proto-user-manual...not only takes care of the initial design work that goes into the application, but also takes care of the initial steps for the dreaded technical writing involved in documenting how things work! Two birds, one stone! As long as it's kept up to date, that is.

I harbor no illusion that this work will not be for naught. This is a proposal for something that may never see the light of day. And while specs are not fun for most people, I'm finding that the work that goes into the initial stages of planning the application can be rewarding. It's quite a mental exercise to map out an application in your head, try to communicate that to the written word, translate the written word into a mockup, and then refine the written word again.

Even the tutorial for specs pointed out how often this step...the functional spec...is skipped. People like to jump right into coding in some kind of shoot-from-the-hip coding style and fix issues as they crop up. But after trying my hand at my first attempt at a spec, I wonder if spec writing and review is akin to the lack of respect for editors in print news; the industry knows they can cut editors and still have a product to churn out, and they justify it by citing the speed of their competitor, the "Internet," with which they're competing.

They completely ignore the number of glaring errors and botched headlines that slip through. And poor quality writing. The difference between a good editor's refinement of a news story and the shoveled crap that makes its way to print is the difference between a showman's presentation like Steve Jobs' Apple events and those painful talks where every third syllable on stage is an "um."

Another point; how much time is lost having to re-code for errors or changes that would have been caught had it been properly spec'd in the first place?

But those are speculation and opinion. I still have work to do...several more pages to be mocked up and then the second draft to work on. The hard part is squirreling away the blocks of time to work on them. The surprising part is that I'm actually enjoying the process!

Sunday, September 21, 2014

iOS 8: I Can't Turn The Phone Off

My wife recently sent me a message on chat telling me she couldn't turn her phone off.

Of course I sent the usual "You're going to hate the obvious question," confirming that she tried holding the power button down for several seconds. She eventually confirmed it but not before telling me holding the home button did nothing first.

She said the only thing she had changed was enabling a feature where the hotspot turns on when the iPad is near. If you're curious, I think she is referring to "instant hotspot".

At first, she just couldn't get the phone to switch apps or accept input. Attempting to send a text message gave me an error on my phone, and at one point the button presses apparently put the display to sleep the wouldn't let it wake up.

I tried calling the phone (turns out that is still a feature) and she said it rang, but wouldn't let her answer the call; eventually it rolled to voicemail.

"You might have to run the battery out or try connecting it to iTunes," I said.

"I'm not home at the moment," she said. "I don't have access to iTunes."

"Try holding the home button and the power button at the same time for ten seconds," I said.

A few moments later she said, "It's showing an Apple logo."

That seemed to fix it; a forced system reboot. Or at least it's behaving for now. Was it an iOS 8 bug? Just a glitch? Whatever it was, remember there is the standard shutdown...hold the power button until you get the slider prompt to shut down...and a force reset where you hold the power button and home button until the Apple logo pops up.

Sunday, September 7, 2014

I Was Wrong (2-Factor Edition)

You'd have had to be living under the metaphorical rock if you haven't heard about the latest celebrity nude photo scandal. There have not really been many reactions; a handful of responses were quickly standardized and echoed between the THIS IS A HORRIBLE ACT BY HORRIBLE PEOPLE group and the THEY GOT WHAT THEY DESERVED SHOW ME THE BOOBZ group.

Nuanced exploration of the issues is apparently not a strong point for for most online people.

The theft of the images is a case study of many issues. It's an invasion of privacy. Celebrity culture. What are people entitled to know or not know about public figures. Cognitive dissonance from people condemning the image sharing as theft before going back to playing a pirated game or watching stolen movies. Exploring the revelation that one of the images was taken of...and by...an underage celebrity, so are they in possessing of child pornography as well?

The list goes on but there is only one aspect I'd like to review here. When this happened there were initially several reports about the "hack." How did it happen? Was it a breach in iCloud security?
Slowly details came out. While few were reluctant to admit it, it sounded like the celebrities in question basically had crap passwords coupled with security questions that were answered with information that people could find online. The thieves guessed passwords and logged in as legitimate users to get the data.

"You dumbasses," I thought. "You're stalked by fans and paparazzi all the time. Plus having your embarrassing pictures was publicized when Scarlett Johanssen had her pictures stolen a few years back. Why the hell didn't you use 2-factor to protect your stuff?"

I've gone over 2-factor before, but in a common implementation, when an unrecognized device tries to log into your account and correctly enters a username and password a token is sent to a designated "known good" device. The service gives you a limited time to enter that token or else it rejects the attempt.

Lots of parrots will reflexively reply that it's victim-blaming to say they should have had this enabled if they didn't want their stuff stolen. There is almost a need to not acknowledge that the tools to better secure information exist and there are risks to participating in certain activities; we must maintain a victim status, that these people had absolutely no control in stopping this with reasonable forethought placed on security.

Short of not taking the pictures in the first place, this was just inevitable!

As it turns out there is a grain of truth to this. Apple has two factor authentication, much like most other big online companies. But Apples implementation is seriously, seriously flawed. It doesn't cover the method believed to have been used to get access to the photo stream and dump images as a backup.

In other words these people could have done everything "right" and still have this happen.
An article on TechCrunch states that
  • iCloud backups
  • Find my phone data, and
  • Documents stored in the cloud
...are not protected by 2-factor.

So I was very wrong in this case.

Oversimplified, things that can end up costing you money like purchases on iTunes would trigger notification. Apple apparently wanted to keep 2-factor as a credit card protection. Attempts to access your data? Not so protected.

I suppose I shouldn't be too surprised. Apple services have often felt disjointed at points where they should be unified, and security has the feeling of being an afterthought. I remember one instance where I was talking to someone trying to change an AppleID password, and said he couldn't remember the answers to the challenge questions.

Challenge questions? I had changed the password before...I didn't need the challenge questions. Turns out he was using the Manage My AppleID web page to change the password. When I log in to the account through iTunes, it let me change the password without the challenge questions. Inconsistency is not endearing and in my head it calls into question how they're tying all their services together.

In the end it seems Apple has really dropped the ball on security. It's one thing when the end user avoids implementing a security solution because <insert excuses that really is summed up with "It's more hassle than I want to deal with but I'll complain when something happens that these steps would have prevented">, but it's another when a company implements security in such a way that it's not only incomplete but leaves you with a false sense of security in the process.

That doesn't mean the celebrities in this incident actually had 2-factor enabled. They very well might not. It seems at least one of them bragged about their lack of tech-savvy skills. On the other hand, this incident made Apple take noticed of the incident and now may pay more than lip service to the deficiencies in their security implementation.

Thursday, August 28, 2014

Time Machine Corruption...Such Fun

I make backups with an external terabyte hard drive. It is configured for backups through Time Machine, so it automatically makes incremental backups for me every hour.

For the most part, it's an automated function that I don't have to think about. But having worked in technology for a few years, I know better than to fully trust it. So I check my backup status periodically. So of course while reading through the logs I noticed that the backups had failed last Tuesday.

Well, that, and there was a popup saying there had been an error in my Time Machine volume.

It started off with a simple error about being unable to write a file. At least the drive wasn't clicking, and it was visible to the system...it just didn't work properly.

I opened Disk Utility and told it to repair the disk. After running for half an hour, a series of errors about orphaned linked and incorrect link counts scrolled by and a final error message popped up telling me that Disk Utility could not fix the drive. It actually told me that I needed to make a backup and reformat the drive.

The odd thing was that whenever I tried to use Disk Utility to format the drive, Disk Utility refused to allow a format. The partition couldn't be removed, and any attempt to erase the drive gave me an error.

I tried several variations of the diskutil, fdisk and gpt commands to wipe part of the drive; nope, didn't work (although fdisk did change part of the primary partition on the drive...apparently if you encrypt the time machine disk, the disk is not only very hard to repartition, but either the encryption process or the act of formatting the external drive created a "hidden" partition that I couldn't format or remove.)

I stopped short of trying to just cat /dev/random > /dev/(diskdevice), which might have worked, or...maybe not. Like I said, I stopped short of trying it, so I didn't try that.

I was trying to just get the disk to a state where I could get Disk Utility to reformat it. But the drive wasn't having it.

I even fired up the VirtualBox Windows VM and used the USB passthrough filter to try to convince Windows to format the drive. Each attempt just gave me another USB driver error on the VM. Eventually I decided that it was getting late. I was getting tired. And I was getting irritated that everything was failing on me.

The next day I connected the drive to a physical Windows system and opened the disk manager. It showed the drive; it had two partitions. It would let me format the large partition. But the small partition, marked as an EFI partition?

Nope.

Fortunately there is a way to just obliterate the disk contents.

Basically:

  1. Open a command prompt.
  2. type "diskpart".
  3. type "list disk" and figure out which disk is the one you're trying to nuke.
  4. type "select disk #" where # is the disk you're trying to nuke.
  5. If you type "list disk" again you should see an asterisk next to the disk you're trying to nuke.
  6. type "clean", hit enter, and hold your breath. It should be just a few moments. If you pass out, something is probably wrong, either with you or the disk nuke process.
  7. type "exit"
At that point, the drive can be re-partitioned and formatted and, in my case, turned into an encrypted time machine drive again.

The takeaways from this:
  1. Time Machine drives, when encrypted, are more susceptible to unrecoverable problems when there are filesystem corruption issues.
  2. EFI partitions and/or the hoops that CoreStorage goes through to encrypt the drive will make it harder to reformat/repartition should you need to do so. It doesn't make it impossible, but it can make a "newbie" user think the drive is possibly completely broken when in fact it's just being a pain in the ass.
  3. Windows does have some handy utilities hidden at the command line, as much as <favorite OS>-snobs will bitch about Windows for the sake of hating it.
  4. Virtualization is handy has hell. However, when it comes to directly hitting hardware, you're probably going to be at the mercy of the intermediate drivers. If the hardware is oddball or having problems, virtualization will probably not help. Stick to virtualization for software purposes.
  5. I decided to call it quits and go to bed before trying to nuke the drive with a simple "let's cat garbage to the raw device," which might have worked or might not have...but it can be handy to have another computer around running Linux or Windows to try low-level nuking drives too.
  6. I already mentioned using cat to redirect bleh directly to the /dev/diskx device (or rdiskx device, since using the raw interface should be faster) might have worked, but on PC hardware using something like DBAN (Dan's Boot and Nuke) or Ultimate Boot CD's utilities could probably have wiped the disk as well, as long as you don't accidentally wipe other drives you meant to keep in working order. Disconnect those if you can. Otherwise you feel stupid.
  7. Encryption is a good thing. It means the contents of a stolen or lost drive can't be easily read. It also means that if something gets corrupted...perhaps through an unplanned mid-read disconnect (didn't mean to lean on that cable...) the odds of catastrophic filesystem damage skyrockets.
So that was part of my fun day, and so marks the end of my blog hiatus!

Monday, June 23, 2014

People and Their Environment

People are influenced by their environment more than most people probably think.

Or at least, they're affected by their environment more than I thought they were.

I'm talking about the little, but significant, ways the environment affects people's behavior. I noticed this after my recent move to the middle of Queens. I started to notice some patterns in how people transport goods.

I grew up in a rural area. Most of my life, including time spent in college, was spent in a rural PA town. When we wanted supplies, we drove to a supermarket or to a Sam's Club; we loaded the car, drove home, and I'd make five or six trips between the house and trunk unloading supplies. Most of our transportation was car based; we were limited by the storage capacity of the car.

Then I moved to Manhattan for my job. In Manhattan it wasn't uncommon to see people pulling little carts behind them. The carts had two wheels and a stand-foot; the basket was basically a canvas-like bag, roughly three feet high with a clasp flap to keep items from flying out. IKEA calls them knallas.

These things are about as common in Manhattan as rolling suitcases. I never saw them while shopping back home; but they are very suited to life in Manhattan. Unless you have a lot of income, the average apartment is quite small and cramped, and the more affordable apartments are often walkups. The knalla rolling cart was big enough to carry a few bags-worth of groceries while being small enough to maneuver up steps and around sidewalks. They were common enough that you need not feel strange walking around pulling one of these rolly-carts.

Then I moved to Queens. I grew up in a rural town, where your neighbors were fields or trees. Manhattan was skyscrapers and pavement; everywhere you looked was a monument to mankind's craftwork. It was the polar opposite of my home.

Queens is another facet of NYC, one that you don't see in movies and television shows. It doesn't have the skyscrapers, but it is anything but rural. It's more along the lines of suburban sprawl; chain restaurants and malls interspersed among residential apartments and homes. While Manhattan was filled with skyscrapers, most of the area I moved to seems to have leveled out around five or six stories.

I noticed that the people here also pushed carts around; these carts are larger, though. Instead of canvas or plastic strapped to an inexpensive hand-cart frame, these are four-wheeled metal-mesh carts with probably twice the capacity of my little IKEA cart. I see these mesh carts around all the time filled with groceries and supplies; in some cases young children are sitting in them being pushed along by a tired parent; I never see the knalla-type carts.

It's a subtle change, but pervasive. It's like rolling into town and noticing that everyone is driving the same over-sized customized truck, or that every kid managed to afford a spoiler for their car in the high school parking lot. A group hivemind, if you will.

The strange thing is that this area of Queens is so diverse yet shares this little quirk.

But when you think about it, there could be a reason it makes sense. Back home your supply runs...groceries, or trips to bulk suppliers like Sam's Club...were limited by the car or truck you drove. In Manhattan, people tended to get more things delivered and actual shopping excursions were to places that were cramped to begin with; many grocery stores resembled what back home were convenience stores in size, or small bodegas. This area of Queens, however, you get access to full size Barnes and Noble bookstores, Kohls department stores, Staples, even a Costco. Back home is still very much a car culture and the shopping conveniences are geared for it. Queens and Manhattan have enough public transit that not owning a car is not so much a hindrance, but the larger stores (and sidewalk space) seems to be open enough...and the stores geared for...the larger capacity mesh 4-wheeled carts.

It's another little observation I've made about people and their environment since moving to the city. It's fascinating to me to experience things that I may have been told about before coming here but written off as rubbish speculation. Speculation until you come here and actually see what effects the city has on people. In the past I've summed the phenomena up as, "We used to laugh when people moved the country from a city and not know how to swim. What do you mean you can't swim? Then I came to the city, where the only pools you have access to are in places like Central Park or a school or a Y, and in many cases cost money to get access to. Kids can easily get the necessities within a few blocks of their apartment, and never actually move outside the city or even need to learn how to drive yet still function in society. And may the universe have mercy on you if your family isn't wealthy and you live in the city. That alone will cut your exposure to opportunities. Now it's not so surprising to have someone from the city move to the country and see them look around like it's a different planet. In many ways, it is."

Now I'm seeing the effects of pockets of culture within different areas. Shared community behavior, in novel things like common tools for helping you get groceries to your apartment. It's interesting to see how various areas share a common behavior and it's probably not even a conscious choice.

But what does that mean for other possibly linked behaviors by residents in certain areas? Are blighted communities breeding a particular mindset by residents? Do we have areas where stupid is not just common, but pervasive, where schooling is prevented not because the school system is inherently bad but the community mistrusts academic behavior? Do we have areas where there are so many people effected by a poor economy that poverty or lower-middle-class economic status is somehow encouraged among residents?

Maybe it's something to consider despite the idea that we are in charge of our own future and economic standing. Maybe we have our community influencing us more than we think sometimes. Take a look at your neighborhood and see how much you fit in. You may find that it's more of a mirror than you originally thought.

Monday, June 16, 2014

Critical of Approaches

It shouldn't be a surprise to anyone that I was working on my GoLang project when I found something that, although relatively simple, I still Googled for the exact syntax to use. I wanted to trim out leading spaces from a string.

Seeing as this was a programming related question I was in no way surprised when the link I was given led back to StackOverflow. The question was asked almost precisely as I had worded it, too. Nice!

However, the question had downvotes, and the first comment was somewhat snarky; "Seriously... you didn't google that, did you ?"

I'm assuming this is a reference to a question of whether the user had checked the GoLang documentation, since the Go language has quite a bit of (rather terse but straightforward) documentation on the standard and common library functions in the language. The poster said that he did, but didn't understand what the cutset was as referenced in the trim function.

The problem as laid out in the question was that the asker had a question while working on something and laid it out as he had searched for it (which apparently was really good for Google indexing, since I found it near the top of search results.) They had found the reference documentation and didn't understand something as it was worded there. Rather than ask about that step in the troubleshooting process, they backed up a step to the original question, and asked it. And was mocked for it.

It reminded me of a damned if you do, damned if you don't situation I've occasionally run into. Recently I've been paying conscious attention to asking questions framed as an end goal, and not framed as a step I'm on in troubleshooting or finding a solution.

For example, asking about changing a particular block of code in a phone server would yield a response of, "What are you trying to do?," and sometimes that would lead to a, "What you might actually want to do is XYZ." The person had  better way of achieving the results I'm looking for, or know of gotchas in what I was trying to change.

Framing the question in terms of a step along the path to what I think is the way to achieve a goal means I might be going down a rabbit hole. Working with someone more knowledgable means I might find a solution that benefits from their experience.

The problem is that learning the how of something takes more time. In many job situations, this isn't appreciated; you need to solve a problem and move on. You're kind of penalized if there's a perception that you're using company time to do something like "learning." I've had conversations on this vein with someone in the Geeking After Dark podcast, where I described a mentoring or learning program sponsored by an employer would be beneficial for an employees professional growth, but he argued that if it's not a benefit to the employer and took up work time it's not something worth doing. Learning has to take place on your own time, and it's commonly expected that employees improve themselves, even in a professional capacity, on their own.

So when do you seek learning how to fish versus the expectation of asking for fish? You're asking a question because you need to solve a problem, and you're penalized for trying to learn the how while the giver of the fish...in this case StackOverflow...has community members that penalize you for not asking how to fish.

Maybe there's not a straightforward solution to this, unless there are more people willing to give an answer while expounding on the solution so the asker has an opportunity to learn. All the poster really needed in this example was a restatement of the documentation in a more learning-friendly manner. Perhaps the asker isn't asking a how-friendly question. But that doesn't mean someone can't answer it as such.


Monday, June 9, 2014

New Programmer Insecurity: Multiple Ways to Implement

I've been working on my GoLang side project for awhile now, and since I didn't sit down and write a specific set of specifications I ended up making a few changes in implementation along the way.

When I get a chance to work on the program, I'll make a few changes, add a small function, test it, and set it aside until my next chance to work on it. Recently I realized I wanted to make a few changes in how the functions...function. But when the application is run, there's no appearance that anything has changed.

That got me thinking about another aspect of beginners programming; another reason I feel fear creep in at the prospect of an experienced programmer looking at what I've done only to scoff at the work I've done. I have been working with the idea that, "As long as it works, I must be doing something kind of right."

Let's take a simple example. The simple, cliche test for a programmer new to a programming language is to have it spit out "Hello, world!" For most languages this isn't all that hard.

I create a hello_world.go file and populate it with the following:

package main

import "fmt"

func main() {

fmt.Println("Hello, world!")

}

Using "go run hello_world.go" yields simple results.

Let's make a simple change. Here's the new code:
package main

import "fmt"

func main() {

var hello string = "Hello, world!"

fmt.Printf("%s\n", hello)

}

A quick retest does this:

Look familiar?

Let's make another minor change.

package main

import "fmt"

func main() {

var hello string = "Hello, world!"

fmt.Println(hello)


}

Run again:

Hmm...still look familiar?

Here's something only slightly more advanced in technique...

package main

import "fmt"

func sayHello() {

var hello string = "Hello, world!"

fmt.Println(hello)

}

func main() {

sayHello()


}

What does it do?
Let's bump it up one more step.

package main

import "fmt"

func sayHello() (string) {

var hello string = "Hello, world!"

return hello

}

func main() {

greeting := sayHello()

fmt.Println(greeting)


}

I bet you can guess what the output looks like.
See a pattern?

The point is that this same output came from several similar, but different, implementations of code. Which of these implementations is "better"? Is there a better way, if the output is the same each time? What if there's another method that "should" be used but I don't know about?

Those are the thoughts that makes sharing source code, for beginning programmers, more of an exercise in anxiety. 

"Look! This is pretty awesome, yeah?"

"Sure. But...why did you do this? You should probably have done this instead."

Is there a sound pride makes as it deflates?

Worse, I'm not sure there is a way to definitely find answers to what the "best" way to do something is. Some languages, like Ruby, encourage a "Ruby Way" of thinking about program design. Other time, as you gain experience while trying to make an application, you gradually learn about ways to implement a function in a way that makes more sense doing it in a particular way than another. Only experience will demonstrate this, and thinking about the design of your application will lead to epiphanies of implementation.

Regardless, there is no simple "This is how you do it" solution, only fumbling through, trying to understand what you're doing and spending time reflecting on how it works so maybe you'll realize a better way to do it. Or you'll paint yourself into a corner, stuck until you find you must refactor how you did something so you can fix the point you're stuck in and move ahead again.

As for my project, I continue to move ahead on it, despite fears of how crappy the code is once it reaches a release-level in my head. There are several more functions to get working before I reach that point. Once there, I'll be proud of it, regardless of how well it works compared to a company application or how crappy the code is, as long as it mostly works as I envisioned. 

Because really...what else can I do?