Tiny Deathstars of Foulness

There’s a great site out there called that will check your bash scripts to verify that they are syntactically correct and offer some tips on fixing issues you may encounter. In the example below, I single quoted at the end of a quoted string, and… error screen-shot-2016-12-14-at-9-44-00-am Hat tip to Daniel MacLaughlin for posting this site.

December 14th, 2016

Posted In: Programming, Ubuntu

Apple developers in growing development teams invariably need a continuous integration system. This automates the build, analysis, and testing solution for software development using Xcode. macOS Server has an Xcode service, capable of integrating your developer account with git, providing many of the options required to build a continuous integration system. Before you configure the Xcode service that can take committed code and then test and build your software, you’ll need an Apple developer account. The Xcode service then links git to a developer account and runs automations, referred to as bots, in Xcode. Therefore, you’ll also need to have Xcode installed on the computer running the Xcode service. Bots are then managed and reported on using a web app that the Server app runs. Once the pre-requisites are met, open the Server app and click on the Xcode service. screen-shot-2016-09-25-at-11-50-35-pm Click on the Choose Xcode button. screen-shot-2016-09-25-at-11-50-54-pm When prompted, browse to the version of Xcode you have installed on the server. Screen Shot 2015-09-24 at 10.11.46 PM Configure the user account to use for the service. screen-shot-2016-09-25-at-11-52-00-pm The service will then require you to login. Do so when prompted. screen-shot-2016-09-25-at-11-53-30-pm This enables the user account, which you will then need to login as. screen-shot-2016-09-25-at-11-54-24-pm You’ll see a new user environment. Use fast user switching to then switch back to your other account. Xcode will require access to the Accessibility framework to run unit tests. Click on Request Access to provide the rights to Xcode to do so. Once access has been granted to Xcode, you’ll see the version indicated in the Build Using field. screen-shot-2016-09-25-at-11-59-59-pm Next, click on Add Team, in order to identify the correct team from your Apple Developer account that will have access to the Xcode service. screen-shot-2016-09-26-at-12-00-28-am When prompted, select the team from your Apple Developer account that you wish to provide access to the server, note that you need to be a team agent or an administrator of the developer organization. screen-shot-2016-09-26-at-12-02-15-am Click on the Repositories tab. Here, you will define repositories for your Xcode projects. Click on the Repository Access button to define what protocols git should be accessible via. screen-shot-2016-09-26-at-12-02-45-am At the Repository Access screen, select HTTPS or SSH. Click OK. screen-shot-2016-09-26-at-12-04-11-am Click the Edit Repository Creators button. At the Repository Access screen, add any groups of users that should have access to create new git repositories. Once all of the appropriate users or groups have been added, click on OK. screen-shot-2016-09-26-at-12-04-30-am   Select your repository again, and click on the HTTPS Access button to provide access via HTTPS. Once saved, double-click on the repository again to see the uri for each type of access. And that’s it. screen-shot-2016-09-26-at-12-05-21-am Next, you’ll want to add a repository to the Xcode app. To do so, open Xcode and then use the Source Control menu to select Check Out. From there, you’ll get a Check Out screen. Screen Shot 2015-09-25 at 7.04.42 PM At the Check Out screen, enter the uniform the repository screen, shown in the previous step of this article and click on the Next button. Next, you’ll need to create bots to automate your build process.

October 8th, 2016

Posted In: Mac OS X Server, Programming

Tags: , , , , , , ,

There is a little tool in OS X called opendiff. This command can be used to bring up a quick and dirty graphical view of changes in a file. For example, if you run opendiff followed by two file names, you’ll see what’s different in the two files and what’s the same: opendiff test test1 The result then looks as follows. Screen Shot 2016-08-26 at 1.03.16 PM Note that in the above screenshot, a and b are in white lines and the others are grey, as those are consistent in the two files and the c has been removed and replaced with the four lines on the left. In larger files, this is pretty useful as it provides quick insight into what is different between two files, like what changed in a script between two different versions.

August 27th, 2016

Posted In: Mac OS X, Mac OS X Server, Programming

Tags: , , , , ,

Dropping network connections can be incredibly frustrating. And finding the source can be a challenge. Over the years, I’ve found a number of troubleshooting methods, but the intermittent drop can be the worse to troubleshoot around. When this happens, I’ve occasionally resorted to scripting around failures, and dumping information into a log file to find the issue. For example, you may find that when a network connection fails, you have a very strong signal somewhere, or that you have a very weak signal on all networks. I’ve found there are three pretty simple commands to test joining/unjoining, and using networks (beyond the standard pings or port scans on hosts). The first is the airport command, along with –disassociate. This just unjoins all networks: sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport --disassociate The second is a quick scan. Here, I’ve grep’d out the network I’m after (aka SSIDofNetwork – a very likely wireless network name), but when looking for environmental issues, you might choose to parse this into a csv and output all networks: sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -s | grep SSIDofNetwork Finally, you can join a network. You might have to escape out special characters in a password and it’s never wise to put a password into a script, etc. But, quick and dirty, this will join that SSIDofNetwork network: sudo networksetup -setairportnetwork en0 "SSIDofNetwork" mysecretpassword Anyway, loop it, invoke it however you invoke it, etc. Hope this helps someone, and if you have other tricks you’ve found helpful, feel free to throw them in the ‘ole comments!

How Users Feel About Intermittent Networking Issues

August 26th, 2016

Posted In: Mac OS X, Mac OS X Server, Mac Security, Network Infrastructure, Programming

Tags: , , , , , , ,

Forgot to save the source code of those AppleScripts in a place you can find it again before you compiled? Quick and dirty, provided you didn’t save it as ReadOnly, you can grab the source of an AppleScript using osadecompile. Just feed it the app (not the applet or the main.scpt btw), as I do with /Users/charlesedge/Documents/ below: osadecompile  /Users/charlesedge/Documents/ Easy peasy.

August 21st, 2016

Posted In: Mac OS X, Mac OS X Server, Programming

Published 5 Lessons App Developers Can Learn From Pokémon Go with App Developer Magazine. Really more focused around the business of app development and release, and a quick read. Hope you enjoy! Screen Shot 2016-08-19 at 10.03.05 AM  

August 19th, 2016

Posted In: Product Management, Programming

Tags: , , ,

Every development organization has tech debt. Modern development projects have gotten so large and complex that there are now dozens of libraries, frameworks, and services implemented in a modern solution. Additionally, there are always new techniques, new modules, new frameworks, new skills, and new perspectives. Applications are now ecosystems, constantly evolving, and our perspectives about them must evolve as well. Yes, a burn down chart looks better when you pay down the debt. Yes, security flaws can force you to pay down technical debt. Yes, most developers always want to fix all the things, including impending dead technology. Modern solutions have many stakeholders. The modern roadmap has to include benefits for existing customers, senior management, the people you send into the field, and net-new customers, coming in based on new features that need to get implemented. You can’t implement new features that help to retain customers and acquire new customers if you are always paying down technical debt. Here are 10 good ways to tell if you need to re-evaluate plans to pay down some technical debt:
  • There’s a new version coming out. Let’s face it, there’s always a new version just around the corner. But a release can be imminent. Take into account the timeline of a new release and choose where to spend your precious development capital, being careful of frameworks, libraries, and services that have a new version about to come out.
  • A version is too new. A cooling off period is necessary with any new technology. Otherwise, you’re learning about all the bugs and limitations of a new solution in real-time. The larger a development organization, the longer it takes to develop the institutional assets required to perform a large-scale effort to implement new technology. And the greater the risk if you go the wrong direction. For example, if you are already updating production applications to Angular 2, are you sure that’s a good idea?
  • You have to retrain an entire team. Retooling an entire scrum team, or larger efforts require you to rethink how you approach various problems, and can require hundreds of hours of training for engineers. When you are looking at larger projects, consider how much time the new tools will save versus the cost to bring in experts to train your staff, as well as the hours required to actually do the work.
  • You can’t hire talent that know the new technology. This is a huge red flag. Maybe you can’t hire someone to help you out because the supply is tapped, maybe you’re trying to implement a framework that’s too new, maybe the library is too old, or maybe it just plain sucks. Either way, if you can’t find engineers willing or able to implement, rethink the whole situation.
  • The cost of doing the project is greater than the cost of other efforts if you do not do the project. Not paying down technical debt accrues interest. That interest can build up over time. But what if it doesn’t? What if the new project makes others more complicated, or doesn’t simplify others? Consider the impact to other initiatives, both positively and negatively when prioritizing your technical debt; especially smaller projects.
  • You have to replace other parts of the solution to make the new parts work. We’ve all been there. You have 4 libraries that don’t work with the new framework. If you start the implementation of new technology, you’ll want to check on each interconnected framework and library prior to beginning to do so, if only so you can properly estimate the time required.
  • Solutions come with new licensing requirements. As noted, most modern projects are ecosystems of dozens of open and closed source libraries (if not more). Many teams now keep a document, or entire database, of the types of licensing used for each of the building blocks that make up the stack of a given application. Each time you update to a new version, you’ll want to first validate that you aren’t entering into an entirely new set of licensing terms.
  • Initial tests go poorly. OK, so you don’t need to scrap a project just because projects where you attempt to scratch the surface go poorly. I like to start with some small wins, stick my toes in the water, and then re-evaluate timelines based on how the initial tests go. You want to get some nice momentum on the burn down chart before you head into deeper waters when doing larger development projects.
  • You can’t compartmentalize the new technology. Let’s say you’re implementing React Native into an application. You already have a user interface that users have been using for, in some cases, several years. Can you implement React on a screen-by-screen basis, or given the architecture of your existing app, will you have to do the whole thing at once? If you can’t compartmentalize the new technology, is it really right for you?
  • You are spending more to pay down technical debt than on new features. Mature products often get you into a place where you’re spending more to keep up with your existing code base than you spend to implement new features in your tools. When you get into this kind of scenario, you definitely need to stop accruing technical debt; however, you should re-evaluate whether a much larger rewrite would be more appropriate than fixing little things here and there.
  • Your goal can be accomplished in another way. Let’s say you have an API, and you never bothered to ship documentation on using the API. This is actually pretty common. There are tools like HATEOAS ( that can allow you to basically self-document the API within the API. Is it better to do that or publish a quick PDF on using the API? Either way, you need the PDF. Most of us would, if time allowed, prefer to go the HATEOAS route; however, again, we have to be judicious with our time.
Ultimately, we all have a limited pool of resources. And as our solutions grow, the amount of effort required to update parts of the code will grow as well.  A lot of these tips involve taking into account the resources required to update the building blocks of a larger application, or project or timing. There’s no doubt that the longer you incur the debt on each of your initiatives, the more interest each incurs. But sometimes, it’s important to keep a larger picture in mind. With limited resources, there is no right answer when it comes to keeping your code modern. You don’t want to accrue too much technical debt. Otherwise code will become unwieldy and developers will run away from your organization when they realize just how much of a hurdle it will be to update your code. But you have to implement new technology in order to keep from keeping up with 30+ year old FORTRAN code in 2016. Next time product management and developers compete for prioritization, check these tips, and see if you’re going down the FORTRAN route, or keeping too modern; hopefully it’s somewhere in the middle.

August 11th, 2016

Posted In: Articles and Books, Product Management, Programming


It all began with: “There are 10 types of people in the world: those who understand binary, and those who don’t.” It’s awful. But these days, there are soooooo, sooooooo many awful computery jokes to choose from. Such jokes. All the laugh. I’ve been collecting silly nerdy jokes about computers in a sticky for years. Now, you can read some of them! You’ll laugh, you’ll cry. Enjoy! What did the computer have at lunchtime? A byte What do computers snack on? Microchips There are no shortcuts in life, unless you right click and find one… Why was there a bug in the computer? Because it was looking for a byte to eat Program, noun: A magic spell cast upon a computer to enable it to turn input into error messages. Don’t anthropomorphize computers. They hate that! One day, a prince goes to a lair to kill the dragon. The prince cuts off his head but two new heads appear. The prince cuts off the two heads and four appear, after cutting those off 16 appear. Then 32, 64, 128, and finally after the prince cuts off 256 heads the dragon dies. Why? It was an 8 bit dragon What’s a programmer’s favorite place to hang out? Foo bar Computers let you make more mistakes than any other invention in history. With the possible exception of handguns and tequila. What do you get when you cross a computer and a life guard? A screensaver The closest I’ve been to a diet this year is erasing food searches from my browser history. I have a huge problem. A friend has placed a screen saver on my computer, but every time I move the mouse, it disappears. Getting a SCSI chain working is perfectly simple if you remember that there must be exactly three terminations: one at each end of the cable, and one for the goat, terminated over the SCSI chain with a silver-handled knife burning black candles. If it weren’t for C, we’d all be programming in BASI and OBOL. Why did the computer keep sneezing? It had a virus What is a computer virus? A terminal illness Is the aT symbol lower or uppercase? Why did the concurrent chicken cross the road? The side other To to get Why did Microsoft name their new search engine BING? Because It’s NOT Google! Optimist : The glass is half full. Pessimist : The glass is half empty. Coder: The glass is twice as big as it needs to be. “The cool part about naming you kid is you don’t have to add six numbers to make sure the name is available.” -Bill Murray “I’m not interrupting you, I’m putting our conversation in full-duplex mode.” – Antone Roundy C++ and C walk into a bar. C++ tells C it has no class. WWJD? JWRTFM! Three developers go into a bar and sit down at a table. The first holds up two fingers and says “Three beers”. 3 developers walk into a NoSQL bar. They left because they couldn’t find a table. Why did the devops developer quit his job? He didn’t get arrays The trouble with programmers is that you can never tell what they’re doing until it’s too late How did the computer get out of prison? Used the escape key What did the spider make on the computer? A website A developer had a problem and decided to use Java. They now have a ProblemFactory. Once upon a time, a computer programmer drowned at sea. Many were on the beach and heard him cry out, F1! F1!, but no one understood. What does a proud computer call his little son? A microchip off the old block. Algorithm: A word used by programmers when they don’t want to actually explain what it is that they did. A man shouts “Can you hear me?” to his son. The son says “What happened, did you run out of toilet paper?” The dad then yells back “No, restart the router, please!” Enumerator? I barely knew her… How many programmers does it take to change a light bulb? None. It’s a hardware problem. How many UX developers does it take to change a light bulb? None, they just make darkness a standard and tell everyone “this behavior is by design” When does a Boolean evaluated expression change a light bulb? After a while How many programmers does it take to screw in a lightbulb? None. Lightbulb is a class with method screw() so it can screw itself. How many technical writers does it take to change a lightbulb? None, the customer will figure it out How many developers does it take to change a light bulb? You’re still thinking procedurally. A properly designed light bulb object would inherit a change method from a generic light bulb class, so all you would have to do is call the light-bulb-change method. How many software engineers does it take to change a light bulb? None. The light bulb works just fine on the machine at my desk… How many IT Support people does it take to change a lightbulb? Have you tried turning it Off and On again? Child: When I grow up I want to be a Ruby programmer. Parent: You’ll have to make you’re mind up. You won’t be able to do both. What’s the object-oriented way to get rich? Inheritance The shortest joke about programming: I’m nearly done! What are the 2 kinds of SQL developers? Those who know how COUNT() treats NULLs, those who don’t, and those who don’t care When your hammer is bash, everything looks like a thumb. The sign of a compulsive programmer is somebody who can count up to 1023 on their fingers (OMG terrible binary joke) What do you mean, it needs comments!? If it was hard to write, it should be hard to understand–why do you think we call it code? //motto if (sad() == true) {sad.stop.();beAwesome();} Why do they call it hyper text? Too much Java Chuck Norris writes code that debugs itself. A Java architect, a .NET developer, and a COBOL graybeard walk into a bar. The barkeeper does a double-take and says… what is this, some kind of joke? Why don’t programmers pray? They don’t like throwing null pointer exceptions! Save the mallocs, free them all! [“hip”,”hip”] Kleeneliness is next to Gödeliness A programmer puts two glasses on his bedside table before going to sleep. A full one, in case he gets thirsty, and an empty one, in case he doesn’t. Why did the fly never land on the computer? He was afriad of the world wide web. How long does it take to copy a file in Vista? I don’t know either; I’m still waiting to find out. Why shouldn’t Facebook have paid $1 billion dollars for Instagram? They could’ve downloaded it for free! What do you call a Swedish software developer? Nerdic Why did the computer act crazy? It had a screw loose RFC 2324: When Shakespeare asked “To be, or not to be?”, he did not provide the answer. But 2B |~ 2B is FF Hardware: The part of a computer that you can kick. Walking on water and developing software from a specification are easy if both are frozen. ASCII stupid question, get a stupid ANSI There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors. Why was the JavaScript developer sad? She didn’t Node how to Express herself KDE is like eating bugs. It’s all right once you get used to it… What sits on your shoulder and goes “Pieces of 7! Pieces of 7!”? A Parroty Error! XML is like violence. If it doesn’t solve your problem, you’re not using enough of it. A couple that does SEO work had twins. For the first time they were happy with duplicate content. What computer sings the best? A Dell If at first you don’t succeed; call it version 1.0! In C we had to code our own bugs. In C++ we can inherit them. What is the difference between a programmer and someone that doesn’t write code? A non-programmer thinks a kilobyte is 1000 bytes while a programmer is convinced that a kilometer is 1024 meters What do airports and computers have in common? Terminals Two threads walk into a bar. The barkeeper looks up and yells, “hey, I want don’t any conditions race like time last!” 0 is false and 1 is true, right? 1 It’s been said that if you play a Windows DVD backwards, you’ll hear Satanic chanting…worse still if you play it forwards, it installs Windows. A Turing machine walks into a bar. The bartender asks, “what will you have?” After waiting a while for an answer, the bartender becomes impatient. “Cmon, what’s taking you so long?” The Turing machine replies, “I can’t decide.” How can you tell the difference between an introverted software engineer and an extroverted software engineer? The extrovert looks at your shoes when talking to you I’m nervous about programming in an untyped language—my penmanship is awful! There’s no place like There’s no place like ::1 I’m not bald, I just have “margin-top: 200px;” How many consultants does it take to kill a cockroach? Two: One to hold it still, the other to install Windows on it What does a baby computer call its father? Data There’s a band called 1023MB. They haven’t had any gigs yet. The word “algorithm” was coined to recognise Al Gore’s contribution to computer science. Cross platform apps are like unisex underwear. How do you keep a programmer in the shower all day? Give them a bottle of shampoo that says “lather, rinse, repeat” .NET is called .NET so that it wouldn’t show up in a Unix directory listing. Computers are high-speed idiots, managed and developed by by low-speed idiots. My password is “incorrect” because if I type it in wrong my computer will remind me, “Your password is incorrect.” Why did the Windows machine lose its trust relationship with the domain? Because it was corrupted in active directory and needed to be removed and added again! Old Dvorak had a farm, . c . c r All programs are poems; not all programmers are poets Yo momma is so fat, when she sat on an iPod, she made the iPad! Unix IS user-friendly, it just chooses its friends very carefully If you put a million monkeys on a million keyboards, one of them will eventually write a python script. The rest of them will write bash scripts. Why can’t computers play tennis? They just surf the net. A programmer goes to the store and asks “Do you have brown eggs?” The clerk says “Yes” The programmer then says “Then give me 10 sausages, please.” Waiter: Do u have any questions about the menu? What kind of font is this? “Knock, knock. Who’s there?” very long pause… “Java.” What’s Forrest Gump’s password? 1forrest1 Why are Assembly programmers always soaking wet? They work below C-level. A SQL statement walks into a bar and sees two tables. It approaches, and asks “may I join you?” Why is it that programmers always confuse Halloween with Christmas? Because 31 OCT = 25 DEC A developer is sent to the grocery store with instructions to “buy butter and see whether they have eggs, if they do, then buy 10.” Returning with 10 butters, the developer says, “they had eggs.” What happened when the web developers met? Love at first site! Why was the computer cold? It left it’s Windows open What does a computer scientist wear on Halloween? A bit-mask Why do developers go broke? They use up all their cache If Java is the answer, it must have been a really verbose question. Two bytes meet. The first byte asks, “Are you ill?” The second byte replies, “No, just feeling a bit off.” If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime. Nothing seems hard to the people who don’t know what they’re talking about. Why was the computer late to work? He had a hard-drive. What do you get when you cross a computer with an elephant? Lots of memory What do you call 8 hobbits? A hobbit I would tell you a UDP joke, but you might not get it. An SEO expert walks into a bar, bars, pub, tavern, public house, Irish pub, drinks, beer, alcohol Computers are like air conditioners, they stop working when you open too many Windows Who is this Mailer Daemon? And why is he sending my emails back to me?!?! The man who invented autocorrect has died. His funfair is next Monkey. I’m sorry for my terrible English, but my native language is Perl. What is an alien’s favorite place on a computer? The space bar! If I wanted a warm fuzzy feeling, I’d antialias my graphics! Why do Java developers wear glasses? Because they can’t C# C++, where your friends can touch your private parts. If brute force doesn’t solve your problems, then you aren’t using enough. What do you get when you cross a computer with an elephant? A 1000 lb know-it-all. Why doesn’t the elephant use the computer? Because it is afraid of the mouse! Why did the computer squeak? Because someone stepped on it’s mouse Why did the cat sit on the computer? To keep an eye on the mouse Why couldn’t the dinosaur play games on the computer? Because he ate the mouse Where do all the cool mice live? Mousepads Why can’t cats use computers? Because they only want to chase the mouse How does a tree get on the computer? It logs on! What did the computer say to the cookie? Can I have your chocolate chip? A girl asked her mother, a software developer, why the sun rises in the east, and sets in the west. Her response? It works, don’t touch! Programmers are tools for converting caffeine into code Yes, I’m sure I used the right password, I saw Bob next to me enter it on his computer. And then of course, “In order to understand recursion you must first understand recursion.” Now, what are your favorites?!?! And feel free to pop in an image of your favorite shirt as well, like “I failed the Turing Test” or “Go Away Or I Will Replace You With A Very, Very Small Shell Script!”

May 13th, 2016

Posted In: personal, Programming

Tags: , , ,

Use the following keys to do fun things when typing a command in bash (mostly keybindings):
  1. Use the up arrow to run the previous command
  2. Continue using the arrow to scroll to commands further in the history
  3. Use Control-r to search through your command history
  4. Control-w deletes the last word
  5. Control-u deletes the line you were typing
  6. Control-a moves the cursor to the beginning of the line
  7. Control-e moves the cursor to the end of the line
  8. Control-l clears the screen
  9. Control-b moves the cursor backward by a character
  10. Control-u moves the cursor forward by a character
  11. Control-_ is an undo
  12. “man readline” shows the bash keybindings (ymmv per OS)
  13. Tab completes an argument
  14. !! repeats the last command. Useful when using sudo in front of the last line from bash
  15. !$ repeats the last argument for a command
  16. $_ shows the last word from the previous command
  17. “cd -” is like a back button
  18. !!:p outputs the last command with arguments
  19. cd !!:* cd into the argument from the previous command
  20. Escape-. expands the argument from the last command
  21. pbcopy and pbpaste accesses the clipboard from Terminal
  22. Use ; to separate commands in a single line
  23. Use | to pipe output to another command
  24. Use > to send output to a new file, or >> to append output to the end of a file or < to bring input from a file
  25. “Open .” opens the current working directory in a Finder window

March 21st, 2016

Posted In: Mac OS X, Mac OS X Server, Programming

Tags: , , , ,

So in 2006, I was young, and I needed the Rupees.

August 7th, 2015

Posted In: Programming

Tags: , ,

Next Page »