Fork me on GitHub
#100-days-of-code
<
2018-09-16
>
practicalli-johnny12:09:50

I was at a conference, uncodebar, for my first day of the challenge so didn't start coding until after the conference (and after socialising in the pub afterwards). It was a great conference and very collaborative. I gave a 45 minute talk on coaching (and coaching other coaches). I also announced publicly that I was doing the 100daysofcode challenge on twitter at the conference in a lightning talk, in the Twitter UK offices 🙂 There was a very relevant talk on keeping a journal of your coding and using that for communicating with your manager and data for performance reviews. When I start my next role I will endeavour to keep a journal for this purpose too.

👍 4
practicalli-johnny12:09:57

Anyway, my first day of coding I knocked up a very quick server side application using ring and compojure. The app was the start of a mock status dashboard, with the idea that I pull in status information from various monitoring systems and display it on one dashboard. I used the compojure leiningen template to create the project then realised how old the template is and had a quick search on http://clojars.org to update the library versions. It was a fairly quick process, although in hindsight I could have just added lein ancient plugin to do the same for me. If I get chance today, I will do a pull request to update the library versions in the compojure template. To make the web page of the application look a bit more realistic I added Hiccup as a dependency, hotloading that library into the REPL using clj-refactor add-project-dependency function. Hiccup allowed me to generate html without writing html, instead using Clojure vectors and keywords to represent the structure and tags. Using the html5 function from hiccup.page I also included Bootstrap from the Content Delivery Network. The result is a very simple mock status monitor to which I will add some sources of monitoring data. This will either be from publicly available api's or my own functions that generate relatively random status data. Progress so far can be seen in my log: https://github.com/jr0cket/100-days-of-clojure-code/blob/master/log.md#day-1-staus-monitor-mock-website-server-side and in the github repo for the status monitor https://github.com/jr0cket/webapp-status-monitor

💯 4
👍 12
Bobbi Towers20:09:15

Today's challenge is kinda like a big cry for help. I'm using this opportunity to dig up a project that I got stuck on: https://porkostomus.gitlab.io/posts-output/2018-09-16-day-2/

😕 4
practicalli-johnny21:09:39

I like the project and the hardware you have, not sure how to fix the problem. I'll take a more detailed look tomorrow to see if anything comes to mind.

Bobbi Towers21:09:55

Thanks! I think I need to take a dive and learn how exceptions work. The docs seem to just assume that you know already from Java, so they weren't much help.

kazesberger22:09:53

so you try to catch any (Runtime-)Exceptions that clojure.lang.Compiler.eval() might throw in order to prohibit the program crashing and instead just print the exception? for now i cannot contribute other than by saying "i think this should work". i dont think this has something to do with lack of exception handling knowledge. As i too like this idea very much i'm gonna invest my R1D3 🙂 (for whatever this might possibly help)

Bobbi Towers22:09:53

Ah, cool! And I think you might have inspired me to finish making my minesweeper game run in the browser. I'll take a look at your stuff on exercism, too!

kazesberger20:09:10

hm, i think i got the solution, but not sure yet what i did different to your code

kazesberger20:09:46

you should just return false in your safe-eval after catching the exception instead of calling -main

kazesberger20:09:28

:man-facepalming:should have seen that yesterday xD

Bobbi Towers20:09:21

cool! thanks, this has been bothering me for months

practicalli-johnny21:09:13

Today I created a pull request to compojure-template project, bumping the dependencies to their latest stable versions. Hopefully @weavejester will find this RP useful. I am very grateful for the work done in that project (and all the other projects you have created). I did spent most of the time exploring how compojure-template and lein-ring works and reading through the code bases of these projects. I must say that the code is very readable and fairly easy to follow. https://github.com/jr0cket/100-days-of-clojure-code/blob/master/log.md#20180916---day-2-investigating-compojure-template-and-lein-ring Tomorrow I will work on the status-monitor app and create some SVG graphics for the dashboard and attempt to drive the display from external data sources or data generated by the application itself (or even knock up an api with compojure-api template). This is giving me a lot of content and ideas for updating my Clojure webapps workshop http://practicalli.github.io/clojure-webapps/

kazesberger21:09:22

R1D2 finished work from yesterday and solved some more exercisms