CodeCTRL is Live!

CodeCTRL automatically scans source code using established code quality tools and consolidates the findings into meaningful metrics for developers, teams and management

It’s been months in the making, but CodeCTRL is finally ready. Plans have been activated and users can now create accounts!

Development will now resume and new features will start to be released on a monthly basis.

Enjoy!

codectrl.io

Tampermonkey Script to Add Desktop Notifications and Filtering Capabilities to Visual Studio Team Rooms

The following instructions will add custom Filtering and Desktop Notifications to the Team Rooms (Google Chrome only). If you find value in this and it doesn’t cause issues for you feel free to pass it on.

  1. Install Tampermonkey.

  2. Click on the Tampermonkey icon and then “Add a new script”.

  3. Copy and paste the contents of the team-room-notifications.js from GitHub into Tampermonkey.

  4. Change the config as desired.

  5. Press Save.

  6. That’s it. You should now get Desktop Notifications for any messages types you have not chosen to Filter from view.

If at any time you experience issues you can either disable the script or remove Tampermonkey all together.

Tasker Recipes for Nest

Since switching back to Android I’ve found the Tasker app useful to automate some of minor aspects of my always connected life.

The first profile I created to control my Nest thermostat. I found that when I was arriving home the Nest would not immediately notice I had arrived. So, I used Tasker in combination with the Smart Thermostat Plugin to detect when I was on my home WiFi and set the Nest to home:

Profile: @ Home

State: Wifi Connected [ SSID:YOUR_SSID MAC:* IP:* ]
Enter: Nest Home
A1: Smart Thermostat Plugin [ Configuration:away: false ]

Similarly the second profile detects when I am at work and sets my Nest thermostat to Away. It also automatically turns the sound down on my phone so I don’t have to adjust it manually:

Profile: @ Work

State: Wifi Near [ SSID:WORK_SSID MAC:* IP:* ]
Enter: Arrived At Work
A1: Smart Thermostat Plugin [ Configuration:away: true ]
A2: System Volume [ Level:0 Display:Off Sound:Off ]

Those were the original profiles I created. I then realized I could use the Wifi Near capability to identify being at other common locations where I may not use WiFi per say, like:

Profile: @ Family

State: Wifi Near [ SSID:SOME_SSID MAC:* ]
Enter: Nest Away
A1: Smart Thermostat Plugin [ Configuration:away: true ]

I even added a profile for when I enter an exit the car using the state of the Bluetooth connection. While in the car, I’m not at home, so the Nest is set to away. Also, I turn the sound back up on my phone because presumable I could be leaving work:

Profile: Car

State: BT Connected [ Name:YOUR_BT Address:xx:xx:xx:xx:xx:xx ]
Enter: Car On
A1: Smart Thermostat Plugin [ Configuration:away: true ]
A2: System Volume [ Level:7 Display:Off Sound:Off ]

Beyond the profiles I created two Tasker 1×1 widgets on the home screen for Nest Home (and Nest Away). I found that during the hot summers I was using the Nest app frequently to tell the house to start cooling down as I knew it be warmer than I’d prefer. Now I can do it with one click and it will be just how I like it when I arrive.

I explored turning apps on an off automatically while in the car (like Waze) but found that the app did not fully start up and/or would not shut down properly. I’d like to get that working.

I’ve also realized I could add other vehicles as well using “BT Near”. This way if I’m riding around with someone the same profiles can be used.

It took a while to think up, and set up, but it is quite satisfying to have working.

Irresponsible Service Providers

I spent some time addressing WiFi issues in an apartment of a large complex. The hunch was it might be related to congestion, but the shock came when iStumbler was used to determine how congested it actually was.

Almost all the access points were running on 2.4 GHz.

And almost all of those were provided by AT&T (i.e. SSIDs of ATT*, 2WIRE*, etc).

Sparing the long story, a piggy backed router on the 5 GHz band increased Internet speeds by 7 times on the opposite end of the apartment and 2 times near the router – nearly a 15 Mbps increase! Note: the original 2.4 Ghz channel on the AT&T router was disabled to free up some unnecessary congestion on the spectrum.

It was an easy fix for this individual but my major concern remains. AT&T is over-saturating the 2.4 Ghz airwaves surrounding the building, but yet they continue to add customers without addressing the issue. An ISP clearly should understand this type of behavior is not going to provide an acceptable level of service to customers.

At minimum they should be supplying routers capable of 2.4 GHz and 5 Ghz so the appropriate spectrum can be chosen to minimize congestion, perhaps assigned by floor.

More appropriately though, AT&T should be working directly with the building to supply adequate Internet service. The customers are clearly there and already paying for it.

 

Rebar Labs WiGLE Group

I’ve been running a Raspberry Pi and Kismet to collect WiFi data in my vehicle for a few years now.

After moving the Pi to a new vehicle I decided to create a group on WiGLE and share my findings. The group name is Rebar Labs and I’ve already reached spot #164 on the charts. My goal is to get into the top 100.

Unfortunately I had a few initial issues with my old data rendering it useless to contribute. Problems included out of sync time stamps (Raspberry Pi does not have a real-time clock) and no recorded GPS location (I found while my GPS was functioning perfectly fine the version of kismet in Raspbian was too old to communicate with gpsd). My stats would likely be much better had I did more testing in the initial setup.

Once the issues with time and gps were fixed I was able to produce some useful data for WiGLE.

How did I fix them?

For the time problem, I fumbled around unsuccessfully to get ntp to communicate with gpsd and finally just borrowed and tweaked some code I found online to script it when the system powers up:

    GPSDATE=`gpspipe -w | head -10 | grep TPV | sed -r 's/.*"time":"([^"]*)".*/\1/' | head -1`<br />
    sudo date -s "$GPSDATE"<br />
    FIDATE=`date --date='+20 year -4 month -15 day'`<br />
    sudo date -s "$FIDATE"

Notice the odd year month and day adjustment. I’m not sure I’m correct there, but for whatever reason my gps is way off as far as the date goes. So far it’s adjusting appropriately.

Kismet was a more straight forward fix. I downloaded kismet-2013-03-R1b.tar.xz, built it and installed manually picking through the instructions here.

Since then things have been stable and I can begin to explore recording other types of data.

A TOR Relay

Rebar Labs is now running a relay in support of the Tor Project. With all the government spying going on I believe there is some real-world relevance to the technology beyond its known darker uses. I’ll be keeping it up so long as it doesn’t cause me too many unnecessary complications.

P.S. I would also recommend switching your primary search engine to DuckDuckGo for day to day use. If nothing else, it can’t hurt.

Dvorak - What I've learned

Odds are if you look at your keyboard the top row says QWERTY. If not, you probably think you’re pretty sweet. Dvorak is an alternative keyboard layout that is supposed to be more efficient. It also has a cool factor – if you don’t understand, don’t ask.

Because of this, I of course decided to try to make the switch after wanting to for some time. I’ve found is it’s not too hard to learn a different keyboard layout once you can type efficiently on another. I didn’t drop down to the hunt-and-peck level since I still had the hand coordination, but I did drop down tens of words a minute. I’m sure with more time I’d be back up to my previous speed.

Problem is I’ve abandoned the idea already. My keyboard is still configured for Dvorak, but I’m again typing in QWERTY. The world isn’t designed for Dvorak and it’s frustrating. It’s designed for QWERTY. While this technically isn’t an issue, it’s still a problem that snowballs.

I equate the switch from QWERTY to Dvorak as the equivalent of being left-handed in a right-handed world (I’m right handed). I now can (somewhat) understand the frustration many left-handers have. While the “recessive traits” of Dvorak may in fact be argued as superior for one reason or another the truth amounts to that the environment still caters to the dominant.

I’m also beginning to argue over some of the so-called benefits of Dvorak.

  1. The home row. Dvorak puts the most commonly used letters on the home row thinking this will make you type faster. I have big hands. I argue this makes it more difficult and uncomfortable for me to type. I should point out that I don’t type correctly though; I type how my hands lay comfortably on the keyboard.

  2. Key organization. Again, Dvorak thought it was more appropriate to spread out the keys so that hands alternate more per word. In QWERTY the left hand types a lot more. I can’t argue this alone as being incorrect, but I’m assuming Dvorak was designed before the mouse existed. I find it convenient w/ QWERTY to keep my hand on the mouse a lot of the time while still being able to type. With Dvorak my hands are almost always back on the keyboard.

  3. Universal commands. Ctrl-C and Ctrl-V on QWERTY require one hand, but on Dvorak it’s two you need. Sure, you can remap them to an alternative, but now you have to learn those changes as well. And that’s just two commands. How about every game you play (W-A-S-D)? Or application suites – Microsoft Office, Open Office, etc). All need special attention (IMHO) to cater to Dvorak.

  4. Switching computers. At work I have QWERTY, at home I setup Dvorak. My goal was once I got the point of knowing Dvorak I could switch both. It’s very easy to switch. Issue is, I’d have to either remember two layouts for other computers I access, or switch every computer I every use. I’ve also found out (when trying to type QWERTY on a Dvorak layout) that I sometimes forget where keys are. I can only assume the same would happen when I’d type Dvorak on a QWERTY keyboard.

For all these reasons it only makes sense to me to continue using QWERTY. If the benefits were visibly large enough perhaps most people would change over. But they’re not. There is no guarantee that Dvorak is a faster layout. There’s the same amount of keys, on the same keyboard. All it is for is to feel cool and to keep people from using your computer.

The Future of Augmented Reality

I’ve seen so many bits and pieces of the virtual reality recently that get me out-of-this-world-excited. Technology is advancing in so many different directions right now with so many interesting ideas popping up all over. I wish I had links to them all. Of course there’s the mainstream

Wii with the most original controller since the light gun. But there is so much more going on than that like the omni-directional treadmill dubbed the Cyberspace Interface that allows you to walk in any direction and still remain in one place. Not only are there innovations to bring us into a virtual world there have been just as many to make our own world feel virtual. There’s an Avatar Machine which I may have brought up before – a camera mounted some distance behind your head, and goggles to allow you to see the real world in third person much like online role playing games. There’s even a set of goggles that, among other things, allow you to see the world in ascii art. Couple those ideas with Markerless Realtime 3D Tracking & Modeling and you have real items in a virtual world and virtual items in a real world. This opens up insane possibilities for the future.

Imagine a day that wearing a pair of vr goggles around with you all day is accepted as normal just as glasses or contacts are today. You walk down a main street and observe ads on the sides of buildings or stop to watch a street performer… but they aren’t actually real, or maybe they just aren’t there. The street performer is a computer program. Or maybe it’s a real person, but projected from the other side of the earth to your gps location. The ads displayed on the walls are just graphical overlays rather than real billboards or posters. There’s no reason for these things to be real or the need for them to be physically there. They are just as real as anything else in the world.

Take things a step further from goggles past gloves to a suit. I’ve seen or read about interfaces that allow you to in a sense feel virtual items and whether they are soft or hard. Now you can accidentally bump into a street performer, or trip over a virtual item, making you question ‘what is real?’ even more. Maybe you stop at a virtual internet terminal – typing on what you think is a keyboard, using a mouse, but it is actually thin air.

Pretend for a moment you are walking. You turn right and head down a short path to get to a destination, but little do you know you have stepped onto an omni-directional treadmill. You keep walking but you are no longer moving. The world in your eyes has become a completely virtual experience. Perhaps the treadmill raises you 100 stories up while you perceive yourself as walking the equivalent or different distance down the street. You reach your destination reach forward and open the real door of the real place. You step off the treadmill out of complete vr, back into partial vr and into the building.

There would be much to develop and overcome to fuse our world and the virtual world but think of what innovations can be done virtually that currently can’t be done for real. How about holograms? Were getting closer, but it sure would be easy using a computer rendering. What about flying like Superman? Obviously not possible in the real, but how about vr? Think about the problems of trying to live in a completely virtual world as most perceive as the only option. How are you going to eat, drink, go to the bathroom? Those issues are also overcome with this merging.

What scares me in all of this is how relatively easy it is to consider this a possibility when comparing it to trying to develop a completely virtual world from scratch such as the holodeck. It reminds me so much of the Matrix, although unintentionally. It makes me question if it would be possible to forget you were wearing the goggles, the suit, or the gear (keeping in mind your virtual self does not have to look like your physical self). I question if I am wearing it right now, becoming aware of an environment I have forgotten.

I imagine over time the world I describe would be no more or less exciting than the one we already live in. But the idea of having a Second Life (pun intended) in our first would be an adventure at the very least to those who’d be involved in building it.

Breaking Out of a Network

The place where I work, and most others, limit outgoing connections to a number of ports for security reasons, and often force the use of proxy servers and other privacy invading tools. Luckily I’m in the IT department so have access to a number of outgoing ‘privileged’ ports already that I can use to run my own securely tunneled proxy server and such…

There’s a great deal of port scanners for finding ways in, but none that I am aware of for helping you get out. Last night before I fell asleep I came up with a two part test on how to do so. It’s fairly simple and can be done as fast (dangerous) or slow (safe) as you want.

The first thing you need to do is setup a firewall on a computer outside the network, say your home computer (ha!) or another computer you have access too. This firewall will log all connection attempts (and drop them) to every port from your workplace. At least for me all my outgoing connections are established from the same gateway, but some corporations may have you bounce around a bit. Either way it should be as simple as an ip or netblock to watch.

Once you have the firewall logging attempts from your workplace you goto work. You take with you a port scanner, any kind really. Then, you scan your firewalled computer that is on the outside. There are 65535 ports to scan, so unless you want the security guys at your desk in five minutes I suggest at least doing this over a few days, or even a month, slowly scanning each port as not to show up on the radar.

Once the scan is completed you can check your logs. Any and every hit from your workplaces ip address(es) are open outgoing ports. You’ve just found your way out. You can now tunnel any traffic out (and back in) from that port.

Now depending on how much traffic you push through a given port, how it looks, how close ‘they’ monitor, and how odd the traffic seems from that port all contributes to how safe this is for you to do.

Beating the Card Game Bullshit

I used to play the card game Bullshit, or at least I did until I mastered it.

We don’t play with many rules as it is a game of lying. It uses a standard deck of 52 cards, no jokers. All cards are dealt out, so in a game of 4 people each player starts out with 13 cards in their hand. The person with the Ace of clubs goes first. Cards are dealt face down on the table so no one can see what they really are, and the player states what he says he has – ‘One Ace’, ‘Four Aces’, etc. He could be lying. It’s your job, as his opponent to call ‘Bullshit’ on him if you think he’s lying, otherwise play will progress to the next player who puts down a 2, the the next player a 3 which continues and loops back to an Ace after the King. So, now, if you had called Bullshit on a player and he really was lying, he has to pick up all the cards on the table. If you were wrong (he was telling the truth) you have to pick up the cards on the table. The first person with no cards in their hand wins. That’s the basic game we play with, although there are many variations.

The first part of the strategy I came up with was figuring out times I should always call bullshit. During the game, there are a number of times where you will have all the cards in the pile on the table, and you should call bullshit since it won’t make any difference. An Example. There are no cards on the table. The person playing is putting down Aces. You have one Ace and should call bullshit. Why? Well, you can’t lose. You already have Aces in your hand, another one won’t hurt. The same goes is if you have one of each of the cards in the pile on the table. Say you didn’t call bullshit and the game progressed to 4’s. If you have an Ace, Two, Three, and Four in your hand you should probably call bullshit. Why? Again you have all the cards, so it shouldn’t hurt to call bullshit. However, you could get screwed if the other people bullshitted their way past you on Ace, Two, and Three with other cards (and lots of them). In summary, it’s best to call bullshit when there’s nothing on the table, and almost a sure thing when you have all the cards that should be in the pile on the table.

The next part of my strategy takes a lot more attention, and is a lot like card counting. Call it, card planning. In a game of 4 people there is a set pattern to the way cards are played (at least the way we play). With that in mind, you can plan to go out in 13 rounds or less. The tricky part is initially organizing your hand in one of the four possible configurations and either bluffing or filling your hand with cards you need. A little more detail follows.

Below you will see the pattern of game play for each player. In a game of 4 you will see it is as simple as adding 4 to your current card to get your next card. By setting up your hand in the order below instead of the common low to high you will already have an advantage.

Player 1: A 5 9 K 4 8 Q 3 7 J 2 6 10
Player 2: 2 6 10 A 5 9 K 4 8 Q 3 7 J
Player 3: 3 7 J 2 6 10 A 5 9 K 4 8 Q
Player 4: 4 8 Q 3 7 J 2 6 10 A 5 9 K

It’s hard to explain how well this works, but it definitely feels better playing this way. There is more certainty to the game. Another benefit of playing this way is now you can call bullshit on cards you don’t have (as long as it falls under the guidelines of my first strategy). Why? Well, if you don’t have an 8, but the pattern above says you need an 8 to be able to go out, you can potentially gain that 8 by losing a bullshit call to someone else. It also means if they are really bullshitting you just prevented them from winning. It takes practice, but it works.