Resolving Grunt Error - libsass bindings not found in...

      Running "watch" task
      Waiting...
      >> File "../scss/theme/_color-mixins.scss" changed. <br />
      Loading "sass.js" tasks...ERROR
      >> Error: `libsass` bindings not found in /Users/~path/_build/node_modules/grunt-sass/node_modules/node-sass/vendor/darwin-x64-47/binding.node.
       Try reinstalling `node-sass`?
      Warning: Task "sass" not found. Use --force to continue.
      
    • Step 1: run npm update from the grunt directory with your package.json. This should fetch the latest dependencies that are specified in your package.json file.
    • Step 2: Likely if you try to run grunt, you'll experience a binding error that reads as follows:
      Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 4.x. Usually this error is followed by the suggestion to of using rebuild node sass.
      Run npm rebuild node-sass
    • Step 3: If you're still receiving sass build issues: try updating grunt
      npm install -g grunt-cli and re-running the above. Also you may need to update Node itself and check your package.json versioning.

    Sitefinity updated logo for 2016

    Sitefinity is a mess

    Trying to track down what's causing JQuery Validate to glitch out and cause a "Uncaught TypeError: Cannot read property 'addMethod' of undefined" error in SiteFinity on a client's website. When signed into the CMS there's one hundred and five instances of javascript tags. Coincidentally, I also redesigned the Sitefinity logo.

    Sitefinity Updated Logo for 2016

    Now for an official press release:

    For Immediate Release: 05/09/16
    Telerik Sitefinity
    http://www.telerik.com/

    Sitefinity Logo updated for 2016 under direction of disgruntled front end developer with no connection to Telerik

    Portland, Oregon: Today unbeknownst to Telerik corp or anyone affiliated with Telerik or Sitfinity, Greg, an front end web developer with a surely disposition and contempt for french roast coffee released an updated logo for Sitefinity.

    The logo shows a daring new approach in design, with virtually no treatment on the logo but instead an abstraction of the word "javascript" repeated 105 times in various states of legibility, using Operator Mono in book weight from esteemed and respected font foundry, Hoefler&Co. The design is a literal abstraction of the way Telerik has almost no regard for the way javascript is treated, and appears to randomly "shit out" javascript tags according to Greg. The alternate design was arrived after initial sketches that included a large singular pixelated middle finger, and a dead musk rat.

    "This is the stuff that haunts my dreams. Who deemed this an acceptable or maintainable design pattern? Is there ever going to be a CMS that isn't some shade of terrible?" Greg ranted on his company's slack channel which elicited zero responses.

    The new logo should be used in any instance of the old logo and is free for use for all.

    About: This press release is 100% serious and real.


    Maschine hangs or crashes on Loading GUI fix

    It's one thing to post a fix, and it's another to explain how I arrived at the fix. As a web developer (and very very long time Mac user), my life is debugging so I have a few more tools to pull from. Hopefully, advanced users will be able to follow my logic to arrive at this fix. You can skip past the following to get the fix, but this explanation may help you to troubleshoot not just Maschine but other apps. I'm not a magician, and I do not pretend to be one, and you too with some practice and time can start learning to troubleshoot computer programs.

    maschine loading

    So recently Maschine stopped working randomly. Having a fair amount of technical prowess I wasn't too worried. I went to my Activity Monitor. For those not familiar, OS X comes with an application bundled in every install called "Activity Monitor," in your applications/utilities folder. Activity Monitor is a GUI (Graphical User Interface) to several UNIX applications that can be accessed in the OS X's terminal. These applications allow you monitor memory / CPU / network usage. As a debugging tool, it's a must as you can see if an activity is slowing your computer down by overly utilizing CPU cycles, ram or bandwidth and force quit tasks that can't be accessed by the normal force quick menu.

    I fired up activity monitor and located Maschine in the list, and double clicked it to get more info about the process and to see which files it recently accessed. Even to me, most of what appears in the log files are a garbled mess of esoteric computer-speak, but I also know that there's relevant info in these logs. Fortunately, files accessed logs are straightforward. In the log, the last files accessed were plist files pertaining to it's freeze state.

    maschine open files

    As an OS X veteran, I knew offhand a few things: plist files are preference files that sometimes get corrupted. They usually can be deleted without any repercussions as the application in question will regenerate these (worst is some settings may be lost) and more importantly that the .saved has to do with OS X's ability to relaunch applications to their last known state. As a rule, Freeze states are pretty much always ok to delete, in fact occasionally you need to dump a corrupt freeze state. This is common practice in iOS when users double tap the home button and swipe up to close a frozen app as iOS doesn't by default "quit" apps, but places them into freeze states. Deleting a freeze-state simply forces the application in question to fully relaunch.

    I started by dumping the Saved Application state, always an import first step in modern OS X debugging but it didn't work. After talking to my buddy Justin, he mentioned that the time Maschine stopped working when he changed plugins. So I had a hunch and decided to take a memory sample in the activity monitor. Memory samples allow you to peek inside to what your application is doing and what information is being accessed at that moment in time. Remember how I said even I don't understand much of what's in a log file? This is one of those times. We know that the application is hanging, so something is causing it to hang, and we can bet that the problem can be "seen" as the program will likely try to access something repeatedly, or we may see the last item the application tried to read before stalling out.
    (the screen caps are clickable for legibility)

    maschine open files

    Note that during the hang, the memory sample is calling PSP echo, which is a popular audio plugin. Maschine like many audio applications runs an initial plugin scan to make sure all the plugins installed are compatible and if they aren't they're blacklisted so they will not crash the host application. This scan usually is run only if the application detects a change such as a new plugin install. This sometimes fails and causes an application to crash. Apple's Logic has the ability to detect failed launches and thus rescans its plugins on a failed launch (a somewhat recent innovation with Logic 8 or 9). Maschine is a little more limited, doesn't have this ability, so it's up to the user to manually reset the approved plugin cache. While I couldn't find the Maschine 2 location for plugins list, I found the following article MASCHINE Crashes at Startup (OS X) which pointed me in the right direction.

    How to fix

    Step 1: Go to the following location on your computer:

    Users/[your user name]/Library/Application Support/Maschine 2/

    Note: You may need to enable your user library folder visibility if you have not done so already.

    Step 2: Drag all the files into your trash.

    Step 3: Relaunch application.

    maschine could not load plugin

    With any luck, you should see something like the message above. Happy Beat Making and troubleshooting! Remember, the activity monitor is one of the most critical tools in a power user's bag of tricks. OS X is big and complex, but almost nothing is done behind closed doors, this means there's nearly always a way to get to the root of a problem.


    Setting up Operator Mono in Coda

    I'm a big Operator Mono fan. A few months ago I wrote how to Set up Operator Mono for Atom. It involves a bit of style sheet hacking. Coda is pretty straightforward, but I realized after roughly eight years of owning Coda, I've never messed with the font formatting.

    Step 1: Set the font in preference under Editor

    Coda preferences

    Click the Editor Font and locate Operator, select the weight you're most comfortable with.

    Step 2: Setting up the italics character set

    One of the best features of Operator Mono is that all its italics are an alternate character set, useful for programming. Coda doesn't pack in a style sheet akin to Atom or Sublime, which is a mixed blessing. It's pretty easy to set up but requires a little more handy work.

    • Click Colors in Preferences
    • Within the colors panel scroll area click on the various code examples and click the bold/italics to check boxes to change your code styles

    Coda color preferences

    To mimic Atom's settings and the examples on the Operator Mono website, I recommend italicizing the following: all comments, tags, variables, attribute names, and leave CSS unitalicized. That's it!


    PostCSS is really slow - PostCSS vs minification and autoprefixer

    A few months ago one of the back-end developers ribbed me, "Front End Developers can't decide if they want to pre-process or post-process their CSS" after learning about PostCSS and CSSnext.

    The worst part is he's right, but we've been doing both for some time unbeknownst to him. Unlike the hazier CSSNext ambition of bringing future CSS code today (based on PostCSS), PostCSS itself simply a library of tools for programmatically manipulating CSS with Javascript which is a zealous under-sale of the potential. Like any good front-end developer, I wanted to see if PostCSS made sense to use since I don't have the interest (yet) to use CSSnext.

    While admittedly this isn't the most scientific test, I ran this using the current versions of gulp and grunt with their respective plugins using a rather large project build on a heavily modified version of Bootstrap 3. The result is roughly 9700 lines without minification, and a 160k CSS file minified. It's big, but it isn't massive either.

    Grunt Results

    Without PostCSS

    • Total 586ms

    With PostCSS

    • Total 5.3s

    Gulp Results

    Without PostCSS

    • Total 388ms

    With PostCSS

    • Total 4.75s

    The configuration looks as follows:
    Libsass -> autoprefixer -> minification.

    In the grunt task, I have a watch task that triggers libass to grunt-autoprefixer to grunt-contrib-cssmin. I replaced the prefixing/cssmin with grunt-postcss.

    For Gulp, the task was nearly identical, libass to gulp-autoprefixer to gulp-autoprefixer. I replaced the prefixing/cssmin with grunt-postcss. The result is pretty much the same.

    What does this mean?

    The takeaway is that previously modules that PostCSS replicates are considerably slower but (and I'll use bold to stress this) this does not mean you should not use PostCSS. PostCSS still has some serious potential if you're into eschewing the pre-processor for CSSNext or looking to use CSS Modules. However, unless you need PostCSS, you shouldn't feel obligated to replace current working tasks with the CSSnext version.


    Kite - an Indie game

    Long time friend, James Treneman is a one man studio making his own game and its in the process of being Green lit on Steam. Check it out.


    Exploring and Developing for the PS4 browser

    The PlayStation 4 is quite the capable device, unsurprisingly able to run Linux. I recently bought a PS4 and in true developer spirit immediately began poking around the browser. To my knowledge, there's next to zero developer documentation. The best I could find was a single PDF from Sony which appears to be dated. My goal is to document what's known about the PS4's Browser.

    My PS4 test setup

    Version: CUH-1200

    OS: 3.50

    Gecko? Mozilla? Netfront?

    whatbrowser.org ps4 screenshot

    Google's whatbrowser gives an error.

    whatbrowseramiusing.co ps4 screenshot

    whatbrowseramiusing.co reads the Gecko-Like User-Agent string.

    whatismybrowser.com ps4 screenshot

    whatismybrowser.com likely matches UA string by closest match, and returns Mozilla.

    whatsmybrowserorg.org ps4 screenshot

    whatsmybrowser.org correctly identifies the PS4 as NetFront.

    NetFront is a proprietary web browser used for the PlayStation 3, PlayStation Vita, PSP, Nintendo 3DS, Wii U and Kindle E-reader. The original Netfront Browser has since been replaced by a webkit powered NetFront NX which appears to power the PS4.

    Support

    Specs:

    • HTML 4.01, XHTML 1.1, XHTML Basic 1.1, CE-HTML, XML 1.1, RSS feed (RSS 0.9/0.91/0.92/1.0/2.0, Atom 1.0)
    • HTML 5 Support: Canvas, Canvas Text, localStorage, sessionStorage, Web Workers, applicationCache, HTML5 Input types (partial) - Notable missing: Geolocation API, HTML5 Input input attributes, picture element, srcset, service workers, web components
    • CSS3 (Flexbox, full CSS3 selector support Media Queries, Animations, 2D/3D Transforms, Transitions, etc.) - Notable missing: Multiple background support
    • CSS1, CSS2.1
    • Javascript V 1.7+
    • DOM LEVEL 2

    PS4 passes all the CSS3.info's select test

    The PS4 scores relatively well on the CSS3 test (Chrome v 49.0.2623.112 scores 52%, Safari 9.1 54% and FireFox 45 63%)

    Security:

    • TLS1.2 *no compression
    • NSS
    • Configurable digital certificates
    • Extended Validation
    • Elliptic Curve Cryptography
    • No SSL support (2/3)

    Viewport: unsupported

    WebGL: unsupported

    PS4's webGL error

    • Image Formats: JPG / GIF / PNG / BMP (32 bit + compress supported)
    • Note: TIFF image format is unsupported (commonly supported in WebKit).
    • Video:

      • Container: Mp4/HLS
      • Codec H.264
      • Profile: Baseline/Main/High
      • Level: 4.1 or lower
      • Resolution: 1920 x 1080 or lower
      • Framerate: 60 fps or lower
      • Bitrate: 20 Mbps or lower
      • Autoplay: supported
    • Audio:

      • Formats: AAC (LC or HE-AAC v1)
      • Channels: 1 channel, 2 channels, 6 channels (AAC-LC only), or 7.1 channels (AAC-LC only)
      • Sampling rate: 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, or 48000 Hz
      • Bitrate: 48 to 3456kbps
      • MP3/WAV/AIFF/AU/MIDI unsupported
      • Audio playback using the audio element is not supported.
      • Direct links to audio is not supported
    • PDF: unsupported
    • Downloads: unsupported

    Browsers Tests

    Successful:

    Acid3 test

    Sunspider 1.0.2 test: Overall score: 3203 ms using remote login (and a game left open)

    unsuccessful:

    PS4's fails to load html5test.com...

    Notably, some previous users have completed the HTML5 tests; you can see the scores: here.

    PS4's fails during Octane test...

    Not pictured: Jetstream

    The PS4's weakest link appears to be modern JS support. Unsurprisingly the PS4 isn't a strong performer. In a very uncontrolled environment with three concurrent browsers open, and roughly 25 tabs and several apps, my MacBook Pro in chrome scored a 157.8ms vs the PS4's 2929ms (Lower is better). An iPhone 6 scores roughly 326.6 ms. The big differences here are that both Chrome, Safari and FireFox use highly optimized JS engines, V8, NitroJS, and SpiderMonkey respectively. However, other users report much better SunSpider benchmarks clocking around 1027ms which places roughly at the performance of an iPhone 5 when it comes to JS. While the PS4 certainly has room for improvement but is unlikely to see massive gains as I highly doubt most people spend much time in the browser outside of gaming.

    More to come...

    Stay tuned; I plan to update this over time. Testing the PS4 is tedious as the remote support doesn't allow text input via keyboard.

    Planned tests: weinre remote debugging, FireBug Lite, BrowserSync

    Anyone with better documentation or more information, please feel free to e-mail. Thanks!


    The Encryption debate wages on

    The Obama administration took a seat in the encryption debate, even in light of What's app rolling out end-to-end encryption for its billion users. Worse yet, the leaked senate bill is soft on security, high on fear. At least there's a few out there fighting the good fight.

    It's almost if there's real world analogies to draw from.


    But He's Not Wrong

    Palmer continues to clarify what he meant by that blunt statement by saying “It just boils down to the fact that Apple doesn’t prioritize high-end GPUs. You can buy a $6,000 Mac Pro with the top of the line AMD FirePro D700, and it still doesn’t match our recommended specs. So if they prioritize higher-end GPUs like they used to for a while back in the day, we’d love to support Mac. But right now, there’s just not a single machine out there that supports it.”
    - ShackNews.com

    The only Macs capable of handling the Oculus Rift built by Apple are 3 years out of production Mac Pros... or Hackintoshes. Those of us with either still have dual booting, so there's always that. I've come to the conclusion the 2013 Mac Pro's trashcan looks are a metaphor for what Apple thinks of professionals.


    Messages not delivered error fix

    The message "Not Delivered" has eluded me longer than it should have after retiring my MacBook Pro 2012 Retina for a 2015 Retina. I was able to message anyone using an iOS device through messages but unable to send SMS to non-iOS phones. Here's the fix, it requires both your iPhone and your Mac to be handy.

    Step 1:
    Confirm your messages has been configured on your Mac in messages preferences



    Step 2:
    Go to Settings -> Messages and then finally to Text Message Forwarding



    Step 3:
    Add your computer:



    Step 4:
    A confirmation code will be sent to your Mac in Messsages, it may take a few seconds. Be ready to punch in the pin on your iphone.

    That's it