Sunday, November 10, 2019

How The ISE team at Stack Overflow does Python Linting

Some time back I wrote this short guide for our internal wiki at Stack.
I'm sharing it here for anyone with an interest in Python linting.
Our team generally subscribes to a modified version of pep8.
Reference: Google Standards for Python

  • We allow long lines up to 120 characters.
  • Classes should be CamelCase
  • All other variables lower_snake_case
The following are recommended steps using Sublime Text linting with Anaconda.
  1. Install sublime text Package Control
    • From inside sublime text:
    • CTRL + SHIFT + P to open the package control menu 
  2. Install anaconda
    • if you already have it you may need to reinstall anaconda when done
  3. Install Sublime Text Package Resource Viewer 
  4. Update Anaconda Settings
    1. Go to preferences -> Package Settings -> Anaconda
    2. paste anaconda settings into the user settings file 
  5. Using Package resource viewer open your current color scheme 
    1. CTRL + Shift + P - then type color scheme 
    2. Select The Package Resource Viewer option for your color scheme.
    3. Add the color scheme JSON into the Rules section of your color scheme. 
    4. You'll need to do this any time you switch to another color scheme.
If everything worked out, your editor should now look something like this:
(Yellow dots indicate warnings, Red errors, blue spacing mistakes.)
An explanation of the error will appear in the bottom of the editor

Sunday, May 27, 2018

FizzBuzz in Go

I recently started poking around at Go again.
I like to prove I can write FizzBuzz in a new language (without looking up any language-specific syntax).

This is pretty straightforward - sometimes people go with a case statement, but I wasn't sure what kinds of comparisons were allowed in a Go switch.  It might be fun to see if I can perform an evaluation (i%5 ==0), or am limited to specific values (1,'a', false).

Thursday, June 1, 2017

Getting Started with Appengine

My brother asked about building web pages on Google AppEngine.  A while back I recorded this getting started tutorial.  The expectation is 0 knowledge of how AppEngine works and brings you from empty folder to working website in under 45min.

Monday, January 9, 2017

Password Mindfullness

No one likes changing their password.  Memorization requires wrote.  Most password policies create passwords that are hard for people to remember, and easy for computers to guess.

Password change can be fun, and even useful outside of improving security.  I'd like to suggest the idea of "Password Mindfulness".  Use your password change as an opportunity to focus on something you want to improve.

Create a simple phrase that makes you mindful of a goal.
  Some examples:

Managing Stress:

  • MyProblemsAreSmall
  • SipTheCoffee.EnjoyTheTaste
Building Relationships:
  • AskOthersAboutTheirDay
  • TheGreatestJoyIsTakingAnInerestInOthers!
Regarding the 2016 Election:
  • ThisTooShallPass!2016
  • The only thing necessary for the triumph of evil is for good men (and women) to do nothing.
    • (Keep in mind most passwords can include spaces, so the above sentence is long, hard to crack and includes special characters)
Mindful Passwords can be strong, and call us to an awareness of something.  (An added bonus is that as your priorities change, you can update your password.  No need to wait for that 90 day roll over!) 

Thursday, January 5, 2017

Hello, PC - Leaving Apple Hardware

Part of working at Stack Overflow means refreshing a desktop or laptop build every 2 years.  For the better part of the last year, I've been waiting on my refresh, and proclaiming the good word about the upcoming Macbook Pro 2016 refresh. Sadly, MBP 2016 refresh is generally underwhelming.  As a result, I went with a Razer Blade 2016 with  Razer Core docking station.

Razer Costs:
  • Blade QHD+ 1Tb - $2700
  • Razer Core - $500
  • GTX 1080 - $680
  • ASUS 27" PQ278QR - $699
Total: ~4600

Apple Cart
(The 2016 MBP, with considerably less power comes in about $600 higher)

The Razer Core acts as a docking station connecting the PQ278QR, a second vertical document monitor, and my assorted USB peripherals (USB hub / mouse / keybaord / headset). 

  Only 2 leads connect to the laptop - USB C on the Right, and the laptop charger on the left.

To keep my host OS as agnostic as possible, a majority of my work day is compartmentalized into VM's.  Any kind of web development is done in my Ubuntu VM.  OSX Development for Simian / Caulflower Vest is done in either my OSX Development VM, or an OSX Testing VM (Simultaneous running of these VM's has been the greatest strain on the 16GB of system ram.  Bumping my paging file to 32gig seems to have resolved most issues).  I offloaded my domain joined Windows VM to a Vmware View Pool running on a remote ESXI cluster (Although this could have easily run locally as well.)

All local VM's are backed up daily to my Synology, and the Synology copies that volume to AWS.  

With very little customization to the laptop OS (aside from aesthetics / workflow tools like Divvy and Pussh) I can easily remain host agnostic.  In researching this build I discovered that the Intel NUC is compatible with the Razer Core.  The NUC could easily replace my laptop in the event of physical damage or repair.

Windows 10, while a huge improvement over 7, still has significant use issues.  Working with multiple monitors with varying DPI is a nightmare.  Moving a window from screen to screen results in a stutter.  At high DPI, windows 10 is not pretty.  (Where native windows fails, a multi-monitor ubuntu VM works just fine)

Going with the Razer meant the same ram limitations as the MBP at 16GB.  While this was a major factor in pushing me away from the Macbook Pro, I reasoned that I could get by with less demanding Linux VM's, than running Windows in a VM on OSX.  

The Bezel
Razor hardware is nice overall, but the bezel is just hideous.  I'm not someone who would have thought I'd care greatly about bezel size.  The bezel on the Razer is over 1" in place.  

Overall impressions

With the pull of 2 cords, I can take my gaming and development systems anywhere.  The Razer has an onboard GTX1060, which is GREAT for most games.  Using Duet I can turn my ipad into a second screen, or use my AOC 16" monitor.  

Part for part, the Razer 2016 has better graphics, Ram and CPU compared to the Macbook.  Not much to say on this, other than I'm getting much more machine for less.  

In conclusion - Never again Apple.  I was so ingrained in the Apple ecosystem that I nearly forgot what it was like to freely choose the hardware and software I wanted.  Some things are done very well by Apple  - OSX is a beautiful OS that looks great even in my VMs.  It's disappointing that a few marginal hardware improvements (32 gig of Ram, a reasonable battery, working with NVidia to put a substantial card in their system...) could have kept the MBP as my primary device; I am happy to be reminded by this "Brave" move that Apple does not care about Gamers, or developers with strong opinions about hardware.

Monday, July 11, 2016

Dear Blizzard: Please fix competitive play.

You don't have to look much further than /r/overwatch to see that competitive play is broken.  Matchmaking is a terrible joke, and Blizzard has acknowledge the problem.

After losing around 15 straight matches this weekend, while playing with very competitive friends, I've concluded ranked play is just not functional, much less enjoyable.

Below are some simple ideas, in patch note form, that would make play less terrible.

    • General
    • Player location data, and other exploitable information is treated more securely in the game client. 
      • We also intend to treat the use of aim-bots and other trainers much more severely.  We've hired 1 team member to create new detection methods for Governor on a weekly basis.
    • Heros
    • [Competitive]
      • Hero choice will now be a draft pick.
        • Players will be assigned draft picks randomly (similar to HotS)
        • Heroes must be unique per teams. 
      • Players with less than 8 hours on a given Hero will not be allowed to select that Hero in draft.
        • As a result, players must have 8+ hours of play on 7 unique heroes before entering competitive play.
      • Players can still switch to available heroes during the match.
    • Competitive Play
    • [Party System]
      • Players can "Search" for filler players based on criteria:
        • Minimum number of hours as a certain hero
        • Willingness to play certain class types
        • Hours since unlocking ranked play.
    • [Rank Experience]
      • Winning a match after a team mate leaves will result in a 2x reward
      • Leaving a match will result in a 2x rank loss for the leaver
      • Players that  lose with a level 25 on PUG will suffer no penalty*.

      • Sudden Death has been removed*.
      • 'Suffer No Penalty' has been removed from the early leaver text.
        • We apparently didn't understand what those words meant*.

  • *Tongue in cheek, but seriously these issues need to be addressed.

; ;