aardvark.code | |||
Pages:
01_intro 02_install 03_simple_example 04_sqlite 05_postgres 06_spark 07_timing 08_best_tool 09_docker 10_static_ws 11_code_gen 12_append 99_faq One Page |
01_intro
20160515
TL;DRAardvark is about putting a bunch of code files together in one file, and executing one command to do all that's necessary (compile, execute, launch on a cluster, ship accross the network,...) to produce the desired output. Stop being a manager of files, but concentrate on code writing! DetailThe 'itch' that led to me to the 'scratch' was the different development environments I had to open up, to run relatively simple code on a spark cluster, use python to copy the results from hdfs, and then use R to plot a nice chart from it. Noticing that switching between contexts, was not helping my concentration nor focus, I decided to put all the code together in one big code file, and use a utility (ie. aardvark) to split it up into smaller files. So I 'cat'-ted all my source files into one file named
and ran aardvark on it. NOTE: on Wed 1st Jun, the split pattern was changed from ##-- to ##== ! Now the number of windows opened in my development environment was reduced to just two terminal windows: one running In this one file, Another idea is to put what is important, or what changes a lot, close to the top, like a 'TL;DR' section or an executive summary. Advantages
Writing code the 'aardvark' style is ideal for a number of relatively short scripts, that have disparate execution environments, and can all be executed from the command line. |