When I was trying the Running Karma’s AngularJS example test/e2e/angular-scenario (on Chrome) I hit on the the following weird behaviour.
TLDR; the solution was to run npm install –g karma@canary
Dinis Cruz Blog
A personal blog about: transforming Web Application Security into an 'Application Visibility' engine, the OWASP O2 Platform, TeamMentor, Application/Data interoperability and a lot more
Wednesday, 19 June 2013
Running Karma’s AngularJS example test/e2e/angular-scenario (on Chrome)
To learn and get an idea of how Karma (the 'Spectacular Test Runner for JavaScript') works, and how it can be used to create browser automations tests, here are the steps I took to get the test/e2e/angular-scenario example to work.
It all started with a clone of: git@github.com:karma-runner/karma.git
It all started with a clone of: git@github.com:karma-runner/karma.git
Sunday, 16 June 2013
Trying to running HuBot (and being stuck on ‘ERROR XMPP authentication failure’)
Sitting on a Starbucks in a Saturday morning (after dropping the kids on PSSA) it felt like a good time to try HuBot (repo is here).
Since I already had NodeJS installed on my test VM, I stated with the Deploying Hubot onto Windows instructions:
Since I already had NodeJS installed on my test VM, I stated with the Deploying Hubot onto Windows instructions:
Labels:
Tools
Using Jabber-net to talk to OpenFire
After Installing Ignite’s OpenFire and Spark (IM server and client), using Jabber-Net, I wrote a O2 Platform C# script to access OpenFire, which will:
- Connect to a local OpenFire server
- Login as a user
- Find the HuBot room
- Join that room
- Post public messages to it
(see end of post for the source code)
Labels:
O2 Platform,
Tools
NDepend Query to visualize call flows
After installing NDepend and writing a first simple CQL query, it was time to try something more interesting, namely a query that could help me write rules to find security vulnerabilities like SQL Injection.
So I decided to write a rule to find out the call flows into/from a particular method, ie ‘Who calls this method and who it calls?’
With NDepend enabled on the source code of TeamMentor/Master , I opened a class and chose this option:
So I decided to write a rule to find out the call flows into/from a particular method, ie ‘Who calls this method and who it calls?’
With NDepend enabled on the source code of TeamMentor/Master , I opened a class and chose this option:
Labels:
NDepend,
TeamMentor
Customizing my first NDepend CQL rule (Potentially dead Methods)
After Installing NDepend, I was looking at the rules execution result of TeamMentor/Master and saw that there were a result of 21 Potential dead methods:
Labels:
NDepend
Installing NDepend
After a nice correspondence with NDepend’s Patrick Smacchia who offered me a license of in exchange for some blog posts on how I used it, here is my first one covering the installation and first run
If don't know about NDepend, here are some references :
If don't know about NDepend, here are some references :
- on NDepend Website:
- Getting Started
- Features
- CQL Syntax , CQL Features and CQL Rules Help
- API
- Exploring Existing Code Architecture in Visual Studio
- NDepend on Wikipedia (with more references links)
- Pattrick's blog
- Other blog posts and articles:
- .NET Tools: NDepend static analysis tool, leave T-Pain behind.
- Educating Programmers with Placemats - NDepend Static Analysis Poster which talks about this NDepend Metrics pdf
- Exiting The Zone of Pain - Static Analysis with NDepend
- Continuous code quality measurement with NDepend and TeamCity
- Static Code Analysis based on NDepend
Trying DevExpress (install and uninstall)
Since I'm still not 100% happy with Resharper performance and system Impact, I just tried CodeRush from DevExpress
The rest of this post shows how I installed, used it and uninstalled CodeRush
The rest of this post shows how I installed, used it and uninstalled CodeRush
Labels:
Tools
Friday, 14 June 2013
AngularJS code editor using UI-Bootstrap and CodeMirror (done without using jQuery)
I’m adding a number of AngularJS views to TeamMentor, and here is a simple HTML based source code editor inspired on the How to Integrate Codemirror With Angular UI post and ui-codemirror repository.
In the end, these are the APIs I used:
In the end, these are the APIs I used:
- http://angularjs.org/
- http://angular-ui.github.io/bootstrap/
- http://twitter.github.io/bootstrap
- http://codemirror.net/ (just the core bit)
Gource Visualisation of "TeamMentor Git Development - 18 Months in 180 Seconds"
Here is a pretty cool video of 18 months of Git commits using the Gource tool which is a software version control visualization tool.
Try to see it in full screen and at 1024p HD quality:
Try to see it in full screen and at 1024p HD quality:
Labels:
Git,
TeamMentor,
Video,
Visualization
Wednesday, 12 June 2013
More TeamMentor UI Javascript trace and debug views
On the topic of TeamMentor UI debug helpers (see Opening up TeamMentor’s Javascript Trace Viewer which hooks TM method calls) here are a couple other useful options:
Labels:
Javascript,
TeamMentor
Opening up TeamMentor’s Javascript Trace Viewer which hooks TM method calls
If you are trying to debug (or understand) the TeamMentor’s Javascript layer, there are a number of debugging tools and options (in the /Javascript/TM/Settings.js file) that might help you:
Labels:
Javascript,
TeamMentor
Tuesday, 11 June 2013
Trying out NCrunch
Intrigued by Kofi’s NCrunch and TeamMentor post, and since today I had to write a number of Unit Tests, I decided to give NCrunch a test drive.
I downloaded the MSI, the install was smooth and next time I opened up VisualStudio there was a new NCrunch menu available:
I downloaded the MSI, the install was smooth and next time I opened up VisualStudio there was a new NCrunch menu available:
Labels:
TeamMentor,
Tools,
UnitTests
Changing the way User Sessions are handled by TeamMentor (will be 3.3 Release HotFix 3)
One feature we introduced in TeamMentor 3.3 was the limitation of only allowing one user session to be active at any given time.
This had the nice side effect of 'preventing user account reuse'.
In practice, this meant that TM users had to stop using shared accounts (like the admin account), which was a good thing.
But, it created nasty side effects where the user can only be logged in once across all its devices. And an even worse side-effect happened when we implemented a SSO solution for a client, and we realized that for the cases where there was one SSO token shared across multiple users, we would have to create an TM account per user session!
So we went back to the Concurrent Logins Have Broken issue, reopened it and changed it priority to P0 (which means that this will be another 3.3 HotFix)
The rest of this post shows the workflow that I took when making the code 3.3 HotFix #3 changes, testing them and pushing the new version to GitHub.
This had the nice side effect of 'preventing user account reuse'.
In practice, this meant that TM users had to stop using shared accounts (like the admin account), which was a good thing.
But, it created nasty side effects where the user can only be logged in once across all its devices. And an even worse side-effect happened when we implemented a SSO solution for a client, and we realized that for the cases where there was one SSO token shared across multiple users, we would have to create an TM account per user session!
So we went back to the Concurrent Logins Have Broken issue, reopened it and changed it priority to P0 (which means that this will be another 3.3 HotFix)
The rest of this post shows the workflow that I took when making the code 3.3 HotFix #3 changes, testing them and pushing the new version to GitHub.
Fixing a couple bugs and pushing new TeamMentor 3.4 Dev Version (from 4 to 5)
This post shows one way to use GitHub to update the main development branch of TeamMentor.
At the moment TeamMentor/Dev repo is at version 3.3 – Dev 4
At the moment TeamMentor/Dev repo is at version 3.3 – Dev 4
Labels:
GitHub,
TeamCity,
TeamMentor
The day CodingLab.org was born
After brainstorming about the idea of 'Open Library' for my RaspberryPi, Arduino, BeagleBone, Pyhton, CodeClub books and materials on the Chiswick High Road with Sarah (my wife), she come up with the name of Coding Lab, as a better way to present the concept to local venues (with the added idea of doing regular/monthly lab sessions in there).
So I:
So I:
- did a quick DNS search,
- found that CodingLab.org was available,
- registered it,
- created a GitHub repository for it https://github.com/O2platform/CodingLab
- added some GitHub Pages
Labels:
CodingLab
Creating TeamMentor release 3.3.2 (3.2 version with HotFix 2)
Now that the two P0 issues are marked as fixed (after a round of QA):
Labels:
GitHub,
TeamMentor
Monday, 10 June 2013
'Open Library' for my RaspberryPi, Arduino, BeagleBone, Pyhton, CodeClub books and materials on the Chiswick High Road
Yesterday I 'dropped' 10 Python books to a friend's kid house with a 'take a look at these books and pick one that make sense to you' workflow (they are trying to use a RaspeberryPI and learn how to code in Python)
Later that day one of the kids asked me '... can we keep two?..' , which is always a good sign :)
This got me thinking that that some of my books (I have lot of them) deserve to be shared with more kids :)
Maybe I could have them 'somewhere' on the local Chiswick High Road (West London) as a kind of 'Public Geek Library' for kids (and adults).
This could also be a great location to put information about CodeClub and examples of what I'm creating with the kids that I am teaching every Wednesday.
Later that day one of the kids asked me '... can we keep two?..' , which is always a good sign :)
This got me thinking that that some of my books (I have lot of them) deserve to be shared with more kids :)
Maybe I could have them 'somewhere' on the local Chiswick High Road (West London) as a kind of 'Public Geek Library' for kids (and adults).
This could also be a great location to put information about CodeClub and examples of what I'm creating with the kids that I am teaching every Wednesday.
Sunday, 9 June 2013
Installing Ignite’s OpenFire and Spark (IM server and client)
When testing HuBot, I needed an IM server and client
Since the HuBot install article that I was following recommended OpenFire and Spark, I decided to give it a test drive.
Here is how I installed and set it up on a local VM.
The first step was to get OpenFire from the Ignite's website:
Since the HuBot install article that I was following recommended OpenFire and Spark, I decided to give it a test drive.
Here is how I installed and set it up on a local VM.
The first step was to get OpenFire from the Ignite's website:
Labels:
Tools
A constant source of confusion: Simplicity
From this reddit I found the really interesting and thought provoking (long) post on A constant source of confusion: Simplicity
Simplicity is a topic that really matters to me, and is something that always try to do when writing code or creating APIs (like the ones in the O2 Platform, FluentSharp or TeamMentor).
That post has some great references, which are well worth a read:
Simplicity is a topic that really matters to me, and is something that always try to do when writing code or creating APIs (like the ones in the O2 Platform, FluentSharp or TeamMentor).
That post has some great references, which are well worth a read:
- Software engineering: An Idea Whose Time Has Come and Gone? - by the author of the Controlling Software Projects: Management, Measurement, and Estimation book and the one that said “You can’t control what you can’t measure.” (something the author now doesn't believe is correct)
- Worse is better - ( Wikipedia quote)"Worse is better, also called the New Jersey style, was conceived by Richard P. Gabriel to describe the dynamics of software acceptance, but it has broader application. The idea is that quality does not necessarily increase with functionality. There is a point where less functionality ("worse") is a preferable option ("better") in terms of practicality and usability. Software that is limited, but simple to use, may be more appealing to the user and market than the reverse...." :
- Dreaming in Code: Two Dozen Programmers, Three Years, 4,732 Bugs, and One Quest for Transcendent Software
Labels:
Philosophy
Subscribe to:
Posts (Atom)