Archive

Archive for the ‘Programming’ Category

Triangle Javascript 2013-07-30 AngularJS and Yeoman

Live tweeting the AngularJS/Yeoman presentation at TriangleJS meeting.  Kyle Buchanan presenting.

  • HTML as your teplate language (can be extended)Two-way data binding between views and models
  • Encourages structure and testing
  • Dependency Injection
  • Templates are a big part of the efficiency.

Kyle showing some code, explaining the $scope. ng-repeat example.

The ng- thingies are called directives.

Now talking about 2-way data binding.

Showing ng-model. There are many ng-<something>. Check out the documentation.

Creating a Service- Angular creates a singleton when it injects a service. They call it a service, but the method is called .factory

app.factory(‘NowPlayingSvc’, [function() {

return {

libraries: [

 ‘Scriptaculous’,

 ‘Protype’,

‘Ember’,

‘ExtJS’

}

}]);

Resources:

  • AngularJS Documentation
  • Egghead.io
  • AngularJS eBook
  • AngularJS on Google+

Look for preso on the TriangleJS github account.

Yeoman http://yeoman.io/

A workflow tools Yo, Grunt, and Bower.

To scaffolds out a new application. Grunt builds, etc. Bower is used for dependency management.

You need node.js, git and optionally Ruby and Compass if you plan to run compass

Working with Yeoman and AngularJS

https://github.com/yeoman/geneator-angular

This Yeoman looks great. I guess I’ll need an Apple to run this stuff.

 

IEEE / Robot and Automation Society Meeting 2013-06-03

Panel discussion about Raspberry Pi. Looks like about 40-45 people in attendance. This was a combined meeting of the IEEE chapter and the local TriEmbedded group.

First, everyone introduces themselves. A lot of electrical engineers. Some very impressive people are here. Fred Brooks is sitting behind me. This is the uber geek group. The Robotics and Automation society will meet on the second Monday of each month.

Terrence Fagan from CPCC talking about teaching kids about programming and engineering. raspberry copilot project. You can teach Python and Minecraft. Raspberry Pi Model B $35 credit card computer. Pitfalls: steep learning curve. Teachers overworked. Still in hands of DIYers and Higher ed. Charlotte Latin TedxCharlotteED on an all girls class. Watch video. David Taylor also had a class using Raspberry Pi. Raspberry Pi – Linux. He uses Debian. Scratch game is a great way to get kids involved. Minecraft is a lego like game that can be hacked by kids. Beagle Board – Beagle Bone Black is the new one. It is a compatible with the Raspberry Pi.

Next speaker: Francois Dion – Dion Research. Fully integrated hardware and software development for industry. A group he started – http://www.pyptug.com/ His blog: http://raspberry-python.blogspot.com/ There were several groups in the Triad area, but not a lot of attendance. He also is part of a hackerspace in Winston-Salem. Raspberry Pi Model A He showed a camera attachment. Raspberry Pi Model B – Minecraft can be implemented in a very small amount of code. You can ssh -X (putty with Windows) into the RP from a desktop. Libelium e-Health 9 biometric sensors. That was a fun demo.

Next Speaker: John Delaney with Fedora. He is demonstrating using the Raspberry Pi as a PDP-11 emulator. Yes, he has gone back in time. A good bit of very technical discussion on the processors within the Raspberry Pi.

Q&A: Demos of some very cool gadgets. People here know a lot more than I do about this and they are speaking in tongues.

Lightning talks: discussion on piping something to an outside service and receive input back such as facial recognition. Arduino takes a photo of a face, pipes the image out to a facial recognition API, and receives the name of the person back. 2) a strange lucite contraption that is very cool; 3) a guy who is using Raspberry Pi in their package for balloon. They have all sorts of devices like accellerometers, GPS, altitude sensors, etc. sending info from Arduino to a storage card. Nearspace balloon project. Showed the camera module for the Raspberry Pi.

Categories: Meeting Notes, Programming

Function Pink Meetup 2013-04-11

April 11, 2013 Leave a comment

Defensive SASS Modular Styles for the modern web John Long @johnlong

John was introduced by meetup rangler Les James. He started out by explaining that he would be mainly talking about modularity in SASS. John works at UserVoice. and writes for fun at @thesassway “the latest news on sass + compass”.

He started out talking about an example of 10k line css file he had to rangle. He got interested in using SASS due to the complexity of working with such a large file.

His examples are out on a site

http://bit.ly/menu-1 is his first example

Worked with child selectors and the code gets very complicated.

Ex. http://bit.ly/menu-2 adding classes to menu bars.

ex http://bit.ly/menu-3 adding more ultra modular approach.

dont think in terms of selectors. think in terms of objects.

Parent-child pattern..tableview, tableview-item, tableview-item-cell.

http://bit.ly/modular-tableview example. he uses multiple classes within the class field to get better modularity.

Plural Parent Pattern .faqs, .faq, .faq-title as an example

Parent-child used to declare (not enforce) object hierarchy for the dom.

subclassing-.item, .ticket-item, .article-item

uses codepen.io for examples.

subclasses used to declare that one object should inherit from the other.

contextual classes .item, .ticket .item, .item .title

difficulty with this is that someone could come along and define “title” and everything goes out of whack.

subclassing is almost always better.

Is there a penalty for using many classes, probably not.

make code clear, avoid premature optimization in css for performance.

Modifiers: use for state is-selected, is-active, etc. has-menu, no-border, no-margin, etc. other: primary, secondary, etc.

generic modifiers: .is-hidden {display: none !important;}

the ampersand operator is a general modifier.

specific modifiers: use nesting and the ampersnad operatior

modifiers: used to change attributes or state on an existing object.

modifiers vs subclassses

Naming scheme

objects tend to be nouns, child  noun-noun, subclass adjective-noun, modifiers prefix-adjective or adjective.

modular typography http://bit.ly/modular-typography

compass is a open-source framework for Sass http://compass-style.org/

@import “compass”

@include “global-reset”

reset vs normalize

reset-zeros out styles on all elements

normalize-normalizes styles across browsers so that all browsers share a simliar stylesheet.

some surprises-

don’t stule with IDs or tags (classes are better)

contextual styles are mostly evil (avoid nesting)

more markup and less styles (often much easier to maintain)

smacss.com, thesassway.com, github.com/stubbornella/oocss, joshuarudd.github.io/typeset.css/

http://smacss.com/

http://bit.ly/defensive-sass-april-2013 is the presentation.

http://codepen.io/collection/lmkqe

http://get-serve.com/

I give his presentation a thumbs up.

His slides are available.

His code examples are also available.

 

Categories: Meeting Notes, Programming

Ruby Brigade Meetup 2013-04-09

April 11, 2013 Leave a comment

Introduction, jobs, old leader moving on, new leader of the meetup group is coming in. Cheers for the guy who was the past leader. He mentioned the PyCon controversy and the response the RB group will have. He introduced Brandon Mathis who will be doing the intro presentation, “So … you want to be a Ruby Programmer.” @brandonmathis brandonmathis.me

Many of the attendees are new to Ruby as it should be. Strictly focused on the language alone, not the other issues like Rails, pair programming, agile, etc. Long intro to the Triangle.

Philosophy of Ruby: he has a fetish for Ruby language. Three basic rules to writing Ruby code, Readable, Minimize Confusion, Make the Developer Happy. Quote by Russ Olsen.

Ruby reads like a sentence. Example of a while loop with a counter.

5.times { puts “odelay”}

Coder speech, language of our thoughts.

Challenge to read code from 5 days ago. Write 100 lines, save it, and look at it again in 5 days and tell what every line does. ([roger] not sure this is true.)

There are at least five different versions of Ruby in the wild. Max started on it in the early 90s. Last release was out 45 days ago. Single pass virtual machine. version 1.9 came out 2 years ago. He is a jRuby advocate. jRuby runs on the JVM which helps when bringing it into enterprise situations. Java devs are less excited about versions that are not compatible with the JVM. Tightly integrated with Java.

MRI is another flavor of Ruby. Ruby 2.0.

Rubineous(sp?) C++ bytecode implementation.

MacRuby is another one. Write Mac applications for the Mac store. Objective-C.

RubyMotion – $150 iOS applications in Ruby.

Basic tools to maintain versions of Ruby.

rbenv- Helps you install different versions of Ruby depending on what version your client has installed on their systems.

RVM-

Homebrew- Mac package manager.

Ubuntu has excellent package manager.

git- number one tool for source control.

Gems- libraries written in Ruby. RubyGems.org

http://guides.rubygems.org/

Bundler- it’s a gem.

Put a list of links for Resources. He will put links on the meetup site.

Did some examples of coding features in Ruby. Everything is an object ([roger] like C#).

Categories: Meeting Notes, Programming