Since I like using AngularJS and the current client project and the last few client projects I’ve been on use AngularJS, I realized there may be others out there who want to start learning AngularJS or enhancing their current AngularJS web apps. So I started a newsletter where we post the newest books, tutorials, articles, modules and code libraries that AngularJS developers should check out.
I was setting up some virtual machines in the last few weeks and stumbled upon problems that I’ve encountered before.
Here are some helpful links for when you’re setting up a virtual machine in VirtualBox:
- How to enable symlinks for shared folders in VirtualBox
- How to use modifyvm to resize a VirtualBox hard disk and how to use clonehd to change the virtual hard disk format to one that supports resizing
- modifyvm manual section
- clonehd manual section
- How to install Host-Only networking on Mac OS X
A good read and insightful.
Originally posted on SourceContribute:
There’s lots of good stuff in here; it’s a mix of war stories and great thoughts. All the italics and emphasis are mine. There really is a lot of good writing in here and it’s a great little book to read. I highly recommend it and only wish the author had put it into book format. Great quotes all around.
View original 1,323 more words
The talk was on 19 September 2015.
Open allocation: people get to decide what to work on and how. Gives people an opportunity to contribute to strategy, business objectives, etc. It’s bottom-up in terms of organization hierarchy.
Closed allocation: people get to decide how to work on something, they’re given the what by their boss, other department, client, etc. This is the typical way things work at a job and in most jobs this will continue to be the case.
Open source projects are open allocation; the maintainer or developer decides what they want to create and then creates it. There’s no external incentive making them give up control over what they want to create.
I’ll be writing more on this subject and hope to do a few more presentations to clarify the ideas, but basically open allocation is the future of (most) work. Our productivity levels are high enough that we can let people have 20% time to think of new projects and to work on them. At a typical company you’re losing value if you don’t let the employees on the front-lines make contributions to the strategy or business objectives of the company.
So I shared gcal-invoice/MountainView Invoice with a few people and they looked at the code and thought it was pretty good (I think, ha. ha.) and I realized that I’ve neglected the project for too long because it wasn’t even possible to hit a running copy of the web app. So yesterday I spent the day getting JSCS, JShint added, the unit tests passing and documenting the setup/install process for the project.
What’s been done
This is what’s been done for the project:
- fixing unit tests, adding some mocks/spies/stubs using Sinon for googleCalendar module, testing selectCalendarAndFilterEvents (which is one of the main parts of the app)
- getting the unit tests to run with PhantomJS rather than Firefox
- measuring code coverage with karma-coverage
- integration with Codacy to check for code issues and automated code review
- integration with Codacy for code coverage using node-codacy-coverage
- cleaned up a few small issues that JSHint caught
- making the app webserver work with Cloud9 (using environment variables for binding the hostname/port rather than hard-coding the values)
- getting the Gruntfile updated to run jshint, jscs, codacy
- locking down some dependency version numbers
- TravisCI integration
What is it?
MountainView Invoice is an AngularJS web app that lets you login to Google Calendar and select a bunch of events, enter an hourly rate, enter any other fees/discounts and gives you a nice daily table with the total, perfect for an invoice. I needed it while I was consulting because there were some days where I worked in 1.5-3 hour blocks, I had a few half hour blocks too and it was such a pain to go through them. I didn’t feel the need for a time-tracker like Harvest because that’s too task and minute specific and I wanted the clients to look at how much value was delivered in the day rather than having them focus on minute-by-minute tasks. High-level view vs low-level details.
So anyway, it’s hard to up 1.5 + 3 + 0.5 + 0.5 + 0.75 + 1.5 + … for every day in a week for months was getting to be a pain big enough that it could use some automation. With MountainView Invoice I would just select all the events in bi-weekly chunks, copy/paste the table of hours per day worked into an invoice and then send it off to the client. Much faster and after double-checking the calculations manually and checking them with unit tests I was confident that I could just breeze through invoice creation.
Very important note: the code is licensed under the GNU GPL (General Public License) version 3 or later. I was considering making it AGPL and may do so if I continue to work on it.
Here are some ideas as to what’s next for the project:
- hosting it on a web server somewhere (not sure if github pages is good enough)
- adding more unit tests to make sure it works for more elaborate use cases (such as 5 events in one day or an event split over 2 days)
- fixing the styling so it looks good on mobile, tablet, and all other desktop browsers
- setting up a configuration JSON file where the google API token can be stored
- sprucing up the style of the invoice table
- allowing other fees/discounts to be added to the invoice
- adding a database such as MongoDB or Firebase to be able to save invoices and to be able to filter out events that have already been added to an invoice (this would have saved me a lot more time)
I think these are all things that can be done in small chunks and worked on a little bit at a time as a side project. I’m not looking to use CoffeeScript or ES6 or any crazy CSS tricks on this. The goal is to have a testable product that just happens to be free as in beer and free as in speech and hopefully someone who’s freelancing out there finds it useful.
Absorbing Another Project
I’m going to merge/take-over the code snippets from angular-snippets.el into angularjs-mode. The easy route was referring people to the website for angular-snippets and letting them choose if they want a bigger library of code snippets for AngularJS to work with. However I realized that the utility of angularjs-mode increases greatly if those snippets were included within the code.
I asked the maintainer of angular-snippets.el and he’s cool with it and the project has the same license (GPLv3 or later) so it should be an easy enough merge.
If you have any comments or want to contribute some snippets, click here and add your feedback.
Code Example Automation
At Meta Stackoverflow there’s going to be a beta release of a Documentation feature. The idea is that Stackoverflow community members can contribute code examples for functions and classes and APIs that they use. It would be like an editable wiki cookbook of recipes, kinda like the Ruby Cookbook or the Perl Cookbook or the Python Cookbook. It’s a very good idea but since I like pushing for as much automation as possible, I started to dream about whether it would be possible to automate generating code examples. It would be hard to generate documentation that explains the code and I think that still requires human intervention but I think the problem of generating code examples is tractable.
If you have the type signatures of a set of functions you can generate a set of solutions that use the functions in different ways, constrained by whether their types match. If a function doesn’t exist that matches, an example of the type can be generated or left as a parameter (an exercise for the reader to fill ;-))
Here’s a sketch of how the idea would look like, it’s pseudo-code:
Having types to constrain the generated example helps and you definitely need to populate the examples with instances of each type. The obvious issue is that the examples generated can appear non-sensical because they don’t reflect what actual happens within each function, they treat the functions as a black-box. I’m not sure how much of an issue this would be because you’re still learning the patterns of using the functions and classes and types and you will likely be trying to run the examples yourself to see what you get.
Maybe the above example would be more accurate if I omitted the output of the evaluations and just left the calling code, like in this longer example which uses functions from two modules:
I’m not sure how much this helps either without more constraints and guidance. I still feel this is worthwhile to automate with a light editing/review pass. The goal would be to get used to different calling patterns for functions and to visualize most of the possibilities of using some library or class or function, more aimed at newbies and new users of that library/class/function.
Originally posted on SourceContribute:
This Saturday, 19 Sept 2015, will be Software Freedom Day.
If there isn’t get on Freenode IRC, find a good channel like #libreplanet and have a cup of coffee, tea or a glass of beer and toast to freedom.
In Toronto, the LibrePlanet Ontario group is hosting Software Freedom Day at 120 Carlton St, Toronto, ON, Canada. There will be talks on what software freedom is and why it’s important, discussion of the usage of free software in musical performances, a few lightning talks, free/open culture short films, and a good talk on email privacy.
Software Freedom Day in Toronto has a twitter: @SFDToronto