Over the years books have been written, blog posts too, all about that mythical “work-life balance” thing, and how one maintains an even keel whilst delivering on ever-growing deadlines and requirements.
How do the most productive people get things done? Well, I think it comes down to some simple, no-nonsense tips which build upon our post about “getting started” from a few weeks back:
There are 35 - 40 working hours in a week (unless you’re Mark). Consider reducing that number still further — say to 32, working four eight hour days and then stopping. This really focusses the mind. Funnily enough, when you hurl days, nights and weekends at something, you don’t necessarily get things done any quicker. An hour of laser-sharp focus trumps a day of faffing at the keyboard every time.
I’ve run a company for a decade now, and since the start have used this baroque piece of accounting software that did everything: payroll, stock… all sorts. Didn’t need 80% of it. Recently I switched to a multi-tab spreadsheet for my accounts instead. Financial stuff gets done in a fraction of the time it took me to plug in my numbers before, and my VAT return details just fall out too: wonderful!
A spreadsheet — no apps, no monthly cloudy subscriptions — just one file for one job.
It’s so easy to sit down at your editor of choice and hack away. Given that many of us are stationery geeks, why not simply grab a favourite pen and notebook, really think about what it is you want to do, and plan. When you reckon you’ve done enough thinking and planning, you probably haven’t. Ponder, gaze out of the window, go for a walk, and after all that write down some more. Then sit at your screen and get your work done.
One of the projects we’re working on at the moment relies heavily on the use of file attachments. Not a problem, LDC Via does that! But we also needed to be able to render some preview text from the contents of the files, so if a PDF, Word document, Excel sheet, or even an image has some text in it, we wanted to be able to show a brief summary of the contents to the user.
Enter the Textract plugin. This is a Python utility which can dig into the contents of files and extract them. It’s also really simple to use in your local environment: you just need to make sure Python’s installed and npm install
does the rest for you.
But then we get to the real world. A dev machine is one thing, but when your app needs to be deployed to Heroku things get a little more complex. Typically, your app will be of one type: node.js, Python, Ruby or whatever. But we now need to have an app that contains two different code-bases. Luckily it’s a relatively simple procedure to set it up.
First, you’ll want to configure your project. In our case today, we’re dealing with a node.js app, so we already have our package.json
file which defines all our dependencies. However, because we also want to add some Python dependencies, we need to add a new file to the project, which is called requirements.txt
:
# This file contains all Python dependencies that are required
# by the Textract package in order for it to properly work.
argcomplete==1.8.2
chardet==2.3.0
python-pptx==0.6.5
#pdfminer.six <-- go back to this after the shebang fix is released (see https://github.com/goulu/pdfminer/issues/27)
https://github.com/goulu/pdfminer/zipball/e6ad15af79a26c31f4e384d8427b375c93b03533#egg=pdfminer.six
docx2txt==0.6
beautifulsoup4==4.5.3
xlrd==1.0.0
EbookLib==0.15
SpeechRecognition==3.6.3
https://github.com/mattgwwalker/msg-extractor/zipball/master
six==1.10.0
Next, we need to add another file called Procfile
. This is basically an instruction file for Heroku that tells it what to do when it’s starting your application. Normally, when you only have a single code-base you don’t need the file as Heroku can make some assumptions, but with two different strands of code we need to give some guidance. So, in our case the file will simply look like this:
web: npm start
Once you’ve committed these files to your code repository… nothing will happen. We’ve made all the code changes we need to, but now we need to go to Heroku. You can obviously do all this with the CLI, but for pretty picture’s sake, you’ll want to go to your application settings page and scroll down to the Buildpacks
section:
Click the Add Buildpack
button and for this case, choose “Python” from the list of options.
Once that’s added, we can simply re-deploy the application in the normal way and Textract will magically work!
Continuing our series where we talk about our preferred code editor
A lot has been said, written, and ranted, about programming editors and IDEs over the years. Allow us to add to the noise.
This week Mark has his rant about WebStorm…
Traditionally I have used the big clunky IDEs based on Eclipse such as IBM RAD and My Eclipse However on a recommendation from Ben I switched to IntelliJ IDEA for my Java and Scala work. After that it was but a short step to IntelliJ’s companion IDE, WebStorm
My main criteria in an IDE is not to cost me time or make me scream in anger: WebStorm manages beautifully here. It is light and easy-going, opening and restoring with no fuss, and whilst I’m aware that I don’t use it to its full capacity, a few of the things I love about it are:
As my work tends to involve a wide range of issues, not just code, I use a stack of “secondary” programs too:
So there you have it: more an overview of my entire toolbox than a simple IDE post!
Continuing our series where we talk about our preferred code editor
A lot has been said, written, and ranted, about programming editors and IDEs over the years. Allow us to add to the noise.
It’s Matt’s turn this week to talk about his choice, VS Code…
Built on the same Electron framework as Mr. Poole’s choice, VS Code is the first IDE I’ve actively chosen that is developed by Microsoft. Although it shares the Visual Studio moniker, it’s a totally different beast to the full blown C# IDE that Windows developers use. This is a lightweight text editor with added bells and whistles. I only switched over about six months ago from Atom, but I’ve found that it’s made my dev experience far more flexible. From the tighter integration of Git, an integrated terminal window and many many plugins, there is everything I need for my daily node and JavaScript development needs. Like Atom, there are so many plugins. Some of my favourites are…
I’ve got others, but I feel like I’m going on a little too much about VS Code 😃
But I also thought it would be good to mention the other place I spend a lot of my time, and that’s Chrome. Just a plain install is great for the web developer, but once you add some extensions, it becomes truly useful.
The ones I can’t live without are…
So these are some of my every day development tools. What are some of yours?
The first in an occasional series looking at the tools we use in our day-to-day work
A lot has been said, written, and ranted, about programming editors and IDEs over the years. Allow us to add to the noise.
Mr. Poole is kicking off with a brief post about his code editor of choice, Atom…
If you haven’t yet ventured into the world of this “hackable text editor for the 21st century” (their words), then it might be worth a go. Atom is an extremely usable, responsive, and distraction-free editor for code, and I’ve used it to the exclusion of all others for my text editing, JavaScript / web coding, bash scripting, and even the odd bit of Java (IntelliJ IDEA is still my IDE of choice for more heavyweight Java programming and testing).
Why Atom? Well yes it’s open-source, free of cost, and has a massive developer-friendly organisation behind it. That’s a cracking start, but the fact that Atom is built on top of tried-n-tested web technology (Electron) is the real clincher. If you don’t like something in the editor, all it takes is Ctrl-Shift-i (Windows) or Cmd-Opt-i (Mac) and you will have a familiar inspection pane at your disposal, a means for tweaking whatever it is that gets on your pip.
Atom ships with a number of key packages, not least the very wonderful Autocomplete-plus, and there are hundreds more to choose from. Minimap is a must for navigating larger files, and the various Linter packages are indispensable too. Here are a few others I recommend:
TODO
, FIXME
and related tasks in a project or whole workspace.We don’t all agree about programming editors at LDC Via Towers: what are your favourites?