NerdeTom
Programming log for Tommy
tirsdag 13. august 2013
MarkDown Library Search
I would really like to use MultiMarkDown because Byword and Scrivener uses it and I like the dialect. Now, if I only could find a library that lets me generate a site from MarkDown files in my project... I searched libraries on the MarkDown library list. But none fit the bill (in june 2013).
This thread on Stack Overflow lists some options, mostly for PanDoc.
PanDoc is a nice runner-up, seems to have more utilities:
Pandoc-Extras lists editors, libraries, scripts, generators...
PegDown seemed OK, but turns out it picks extensions from different dialects.
Of the Java libraries: Markdown4j will implement PanDoc extensions, MarkdownJ seems deserted.
Maven uses TxtMark: com.github.rjeschke / txtmark / 0.10
Play uses Tatua: org.tautua.markdownpapers/markdownpapers-core /1.3.4 / (in play)
Groovy Ant
println "Hello World"
def ant = new AntBuilder( project )
ant.testmacro( dir: "qwerty" )
tirsdag 6. november 2012
Tidsklemt og faglig skjerpa
Innledning
Jeg har utvikla profesjonelt i nesten 20 år. For 4 år siden ble jeg pappa, og har fått mye mindre tid til å holde meg oppdatert faglig, og tiden er mer oppstykka. Jeg er stadig på utkikk etter effektive læringsmetoder og -strategier, helst de som hjelper opp på høyere nivå (Dreyfus).Stikkord
Ukeplan med ting man må gjøre, og ting man vil gjøre.Forplikte seg til å gjøre noe
Gjøre noe ilag med andre.
Være aktiv i faggrupper, meetups - Hackeriet ble fremhevet.
Ha en strategi, langsiktige mål, unngå fragmentering
Velge prosjekt som passer strategien
Velge ting man kan lære eller trene på i prosjektene man gjør.
Tilpasse prosjekt man er i.
Gjøre Code Katas.
Open Sourcing: undertegnede skilte ut en utility fra et prosjekt. På den måten fikk jeg praktisert Scala, som er vanskelig å få gjort ellers på prosjekt, og drevet et prosjekt i flere iterasjoner (fordi det er brukt andre steder). Mer om dette her.
Depositum: investere selv for å få en fot innafor døra og kunne ta prosjekt som gir videreutvikling.
Trening ser ut til å gi energi hos andre. Heller "trene på å sette seg ned ved arbeidsbordet hver kveld klokka 9".
Begynne tidlig på jobb - da får man stilletid. (Overtid er ikke så bra for det er ikke tidsbegrensa).
"The Hemingway Hack": Hemingway la ned pennen når han visste hva han skulle skrive videre, da fikk han en god start neste dag. Omtrent som å skrive en test som feiler før man gir seg for dagen.
TODO-lister har variabel verdi.
Ressurser:
Coursera ble likt: de gir online kurs med faste tider per uke som må følges opp.
MIT forelesninger er ofte interressante / annerledes.
Tillegg
Om man ser etter bøker så har man fx Jolt-awards på DrDobbs.Inspireasjon: Pragmatic Magazine, blogs/rss.
Kode kata: cyber-dojo, Dave´s codekata, Oslo meetup, codingdojo.org.
Mer inspirasjon fra The ultimate Code Kata, Teach Yourself Programming in Ten Years. og hvorfor ikke blogge.
lørdag 18. august 2012
Publish! (JavaZone 2012)
Links to more information
Google code hosting: Getting started.Sonatype OSS Repository Hosting Service: Usage guide.
Blog post with more details than the above (but not up to date)
Guide from Apache.
Script
I will try to convince you that this is not hard to do, and that you stand to benefit from doing such a thing.
I work for the consultancy Antares, we have a stand out in the hall.
I have programmed for some years now, but only yesteryear I opensourced my first project, test-data-control. A tool for exporting / importing data from database.
That was a good experience, and I want to share this with you.
With this formalities around the project were done.
Releasing
After a while I was ready to stage a release - I did it using normal maven release procedure, which put my artifacts into Sonatypes Nexus.Central Sync requirements
Javadoc and source artifacts has to be produced.
Artifacts signed using GPG.
Sonatype helps by providing oss-parent pom that defines tasks related to releasing, and they give nice instructions about how to install and set up GPG signing.
Project does not need to be Mavenized, but it needs a pom.
Licensing
NOTICE is for honoring inclusions - now that I published I needed to track licensing of libraries and code I include.
Subsequent versions
I should have
Then I refactored package structure and pasted in Copyright all over.
And then a complete rewrite in Scala…
I would have been better off starting with the formalities and no code.
Why
Theres was no restrictive firewall or policies. I could cod and commit whenever I had internet. I even submitted work from my iPhone.
Schedules and pressures were not the same either. I felt more pressure to code cleanly than quickly.
I had just read the book and wanted some practice.
Clients would not mind implementation details.
There was a nice article in PragPub magazine that I am keen to follow up on, and I have also read too much about DSLs that I haven´t practiced yet.
And both should be a nice fit here.
A Young Girl Reading, Jean-Honoré Fragonard |
And I can! Even if the project was «done» 2 months ago…
Having a side project facilitated deeper learning.
Many a time I gave thanks to my former self for doing that! Automated tests made it a lot easier to code a little now and then.
And also release quick changes that I needed on my daytime project.
More than once I pondered my craftsmanship.
I did more beautifying, simplification, refactoring and testing than earlier.
Slowed me first, but I improved.
One day at work I realized I could do it, efficiently and confidently.
Publishing my work has driven me to evolve.
El Afilador, Francisco de Goya |
I could sharpen my own tool and skills at the same time.
API cumbersome or lacking? I improved it. More usable with each reuse.
And I gradually learned more about design, documentation and testing.
Also because I forget stuff between iterations, and I can see better when I start with fresh eyes.
Thank you
fredag 16. september 2011
JavaZone: introducing Apache Wicket
Presentation from JavaZone 2011: http://javazone.no/incogito10/events/JavaZone%202011/sessions/Introducing%20Apache%20Wicket
Video posted to http://vimeo.com/28791557
Notes:
7 years old framework, Wicket 1.5 just released
Component oriented, using just java+html
Used by: AdScale, WalMart, MeetMoi, fabulous40...
Just html: elements linked to wicket by attributes: <p wicket:id="foo">, no imperative markup in view.
Just Java: no logic in markup, Components are POJOs, No xml
Components: Manipulate markup, Render content, Receive events (onClick)
Models: data to / from Components, transform data
Behaviors: Decorator / Adapter for Component, manipulate markup of Component, can receive events (onClick), Add Ajax unctionality to Components
Wicket projects: Apache Wicket (core, integration to Spring...), Wicket stuff (components), Seam for Apache Wicket, WiQuery (jQuery), Leg before Wicket (archetypes), Apache Isis (DDD framework), Jolira Tools, Visural Wicket (components)...
Quick start: use Maven, http://wicket.apache.org/start/quickstart.html
Some examples: Hello World, click-counter, sign-up
Navigation: Overview and some detail on: External link, Bookmarkable link, Action
Validators: Overview, simple example and list of provided validators
jQuery integration: WiQuery overview and example
JqZoom: Example, zoom on image, how to integrate
Development / Deployment mode: List differences and show some features
WicketTester: Tests components, UI, Ajax, without starting server, runs in IDE, ant, maven
New in 1.5: Html5 input types, component event bus, some new components, improved internals, simpler request cycle, and more
Component event bus: pre/post example
Wicket 6: next version, preliminary list of features. Shorter release cycle.
Q&A: How do components handle history button? Do you endorse Wicket WebBeans for rapid development?
torsdag 16. juni 2011
OpenSourcing
I recently published my project, test-data-control, on googlecode, and want to jot down some stuff before I forget.
I wanted a subversion-enabled hosting, and chose Google because I have the impression they're fast and convenient pluss I like their philosophy.
At first, I found that I had to choose a license and structure the project so that it goes nicely into Google. I had a little ponder, but chose Apache license to go easy.
Filling in the form was straight forward, but I should have drafted it before I started on the web, these fields were filed:
Project name, summary, description. version control system, license and label(s)
Gotcha: Project name and version control system can not be changed later.
I then proceeded to apply for Sonatype OSS Maven Repository access, so that other projects can get to this library (they even push to Maven Central). Following the Usage guide, I found I needed some more stuff, mainly in pom, and should change my groupId.
Wisdom: I should have known what it took before I first comitted project to Google, but it wasn't a big sweat.
All in all, the application processes were smooth and pleasan. Google project hosting was available immediately, Sonatype OSS Maven Repository access was ready for me over night (I'm on European timezone, so I guess they work when I sleep, which is a nice thought).
I was also surprised to experience a period of euphoria, having published something for the first time. I'd say it's worth the extra effort of preparing it and publishing it just for that feeling. Another nice thing I have experienced since I started sharing my ambitions with coworkers is that my status have increased so that I'm being used as an authority and pulled into discussions about related issues. I also get all kinds of tips now that they know I'm working on this thing. It feels like the project is starting to pull it's own weight.
The authority stamp feels a bit premature, because I feel that I need to produce a fully working system and prove it before I can claim that. I'm only glad that I did a fair bit of literature research before I came to this, so I'm usually able to answer and give some advise without making a fool of myself.
tirsdag 24. mai 2011
Meetup om testing i Framsia
Det handler om å kjøre (all) koden din, så ofte som mulig, med så gode tilbakemeldinger som mulig.
Buster.js ble presentert.
OperaDriver og ChromeDriver kommer sannsynligvis til Selenium 2 beta 4
Mange tester for html5 er skrevet i WebDriver