other-languages

here be heresies and things we have to use for work
borkdude 2016-05-12T17:25:15.000496Z

I'm probably more or less forced to leave my current job (which involves Scala) due to highway air pollution.

borkdude 2016-05-12T17:25:28.000497Z

Whatever happens after this job, I'm going back to Clojure.

tjg 2016-05-12T17:32:57.000500Z

Hope you'll find one soon!

seancorfield 2016-05-12T17:44:52.000501Z

I keep getting recruiters approaching me about senior Java positions… Good to know there are plenty of jobs in that space I guess, but I couldn’t go back to Java...

seancorfield 2016-05-12T17:45:21.000502Z

…besides, I last did hardcore Java about a decade ago! I went to Groovy, then Scala, then Clojure.

seancorfield 2016-05-12T17:45:47.000503Z

I could go back to Scala if someone "forced" me, but I’d rather stay with Clojure.

borkdude 2016-05-12T17:46:57.000504Z

I chose this job not because of Scala, but because of the team, products and proximity from my home

borkdude 2016-05-12T17:47:19.000505Z

But it was nice to experiment with it

arrdem 2016-05-12T18:15:08.000511Z

I need to take the time and chug through haskellbook. I watched an ekemmet talk on typeclasses which was awesome. Really been chafing in my hobby work of late at how few tools Clojure gives me to build and reason about record structures. I understand the appeal of the "bag of k/vs" approach, but it makes exploring a new domain that much harder because you can't build up constraints.

borkdude 2016-05-12T18:24:31.000512Z

Well, Haskell will be one of my hobby languages once I'm back to Clojure

borkdude 2016-05-12T18:24:50.000513Z

I already started in Haskell book in January or so

sveri 2016-05-12T19:23:30.000515Z

I know Java is not Haskell and I never gave myself the time (like 5 years to explore it), but when I see how much pain we have with a REST API in our Java backend and how to enhance it, and only because of the classes / inheritance structure I really doubt that types do so much good, at least in this area. Sure, you can awesome stuff with a type system and sometimes I enjoy it, but then again, it so often hurts me and brings no benefit at all.

borkdude 2016-05-12T19:50:56.000516Z

@sveri: I was just thinking of an example from work. We needed to import some files into an H2 database. The amount of type safe code that was written (with Slick) could be done in less code in Clojure and would probably read much clearer.

borkdude 2016-05-12T19:51:40.000517Z

The only thing with that type of code is you get type conversions more or less for free I guess

borkdude 2016-05-12T19:52:08.000518Z

Well not really, come to think of it. I needed to write some conversions myself

sveri 2016-05-12T19:53:11.000520Z

@borkdude: Yea, I get more and more a feeling that there is a difference between 1. DTOs or whatever you want to call them, namely objects that just hold data and that you have to type and inherit and compose and 2. Some business logic where you can declare additional constraints with types For number two they may make sense, but for 1. its just PITA.

borkdude 2016-05-12T19:53:38.000521Z

PITA?

sveri 2016-05-12T19:53:57.000522Z

Pain In The Ass

sveri 2016-05-12T19:54:01.000523Z

sorry

borkdude 2016-05-12T20:00:25.000524Z

Well in the development of that program, a lot of things went wrong at runtime despite the types. Restarting sbt/scala all the time takes you out of the flow

borkdude 2016-05-12T20:00:59.000525Z

Clojure REPL definitely improves my productivity working on these kinds of apps with file in/out and a conversion in the middle which you can easily verify with some small functions from the REPL

borkdude 2016-05-12T20:02:16.000527Z

For example: you cannot read from the types that an H2 database wasn't closed, etc

seancorfield 2016-05-12T20:08:52.000529Z

@sveri: I agree that types in Java are horrible. There are better typed languages. Types don’t have to be painful.

borkdude 2016-05-12T20:10:01.000530Z

I don't understand that a verbose language like Java is so popular

seancorfield 2016-05-12T20:10:13.000531Z

Because it allows for fungible developers.

seancorfield 2016-05-12T20:11:27.000532Z

Lots of ceremony and "standards" and hand-holding means you can use lower-skilled developers more safely. A lot of (enterprise) Java shops have armies of low-to-mid skill bodies churning out boilerplate code. It’s "safe" and mechanical as far as scaling development is concerned.

seancorfield 2016-05-12T20:12:02.000533Z

(and, yes, I’m extremely cynical about how many (most?) companies use Java these days!)

borkdude 2016-05-12T20:12:50.000534Z

Nothing prevented Guy Steele etc to invent something more like Kotlin back in the 90ies?

borkdude 2016-05-12T20:13:51.000536Z

I mean, you have to be cynical being comfortable in Common Lisp and then inventing something like this?

sveri 2016-05-12T20:14:31.000537Z

I guess Java took off because it was much easier and safer to work with than with C / C++ back in the times

sveri 2016-05-12T20:14:57.000538Z

And they made a lot of advertisements with "Write once, run anywhere" which they fullfilled to a very large degree

sveri 2016-05-12T20:15:16.000539Z

So all in all, back in the 90-ies, they did a lot of things better than existing languages

tjg 2016-05-12T20:16:00.000540Z

Yeah, I think if people go back to the 1996 Java whitepaper, it says what Java (as a UI) is supposed to provide the companies which adopt it: > Primary characteristics of the Java programming language include a simple language that can be programmed without extensive programmer training while being attuned to current software practices. The fundamental concepts of Java technology are grasped quickly; programmers can be productive from the very beginning. http://www.oracle.com/technetwork/java/intro-141325.html#349

borkdude 2016-05-12T20:16:18.000541Z

yes, maybe it was like what Go tries to do: offer a simple language (in terms of not too many features so you don't have a steep learning curve) that is safer than other languages in that area

borkdude 2016-05-12T20:16:50.000543Z

ah, I typed this before seeing @tjg text 🙂

sveri 2016-05-12T20:17:16.000544Z

And, GC compared to manual memory management is a huge time / bug saver

borkdude 2016-05-12T20:17:22.000545Z

To be honest, I feel like I still don't get Java, despite the 'simplicity'

borkdude 2016-05-12T20:17:56.000546Z

I mean I can program in it, but it goes against my principles.

borkdude 2016-05-12T20:19:06.000547Z

For example I had to add some functionality to an existing app. It took me a while to overcome the barrier of: really, do I need to change all of this boilerplate?

👍 1
sveri 2016-05-12T20:22:19.000548Z

It's nice to have a place where I can rant about my work from time to time 🙂

arrdem 2016-05-12T20:22:51.000549Z

@seancorfield: it's funny because I'd largely level the same criticism against go, especially with regards to the design decision of not incorporating a powerful or remotely modern type system.

arrdem 2016-05-12T20:25:03.000550Z

My primary complaint against Java at this point is that the core APIs show their age.

arrdem 2016-05-12T20:25:19.000551Z

Abstraction patterns have changed a lot, there are things that could be interfaces or have interfaces and don't, etc.

arrdem 2016-05-12T20:25:41.000552Z

You can build something atop Java and the JVM which is less awful.... but you're constructing your own crazy land.

sveri 2016-05-12T20:27:33.000553Z

The funny thing is, that, while Java is aging in a negative way, the JVM is aging in a positive way

seancorfield 2016-05-12T20:28:43.000554Z

Java 1.0 / 1.1 was a small, simple language with a small, simple library. And it wasn’t the choice of "enterprise" back then.

seancorfield 2016-05-12T20:29:17.000555Z

I switched from C++ to Java in ’97 primarily to work with a cleaner, simpler — but still powerful — language.

seancorfield 2016-05-12T20:29:28.000556Z

I parted ways with Java around Java 5.

tjg 2016-05-12T20:33:33.000557Z

Java pushed me into Lisp. I was like, “Why can’t I easily automate repetitive things in this programming language, from within the language? Am I weird, or isn’t that the point of programming?” (Common Lisp is all about that; invites you to modify your system.)

borkdude 2016-05-12T20:33:50.000558Z

I always tried to avoid Java. It just didn't interest me.

borkdude 2016-05-12T20:34:31.000559Z

But maybe that is like saying: I always avoided gardening, because I wasn't interested in this shovel.

borkdude 2016-05-12T20:36:11.000563Z

(shovel, I meant shovel)

borkdude 2016-05-12T20:36:58.000564Z

Common Lisp was the first language in my entire CS education that sparked joy (and it wasn't even in the program)

borkdude 2016-05-12T20:39:19.000566Z

After I graduated I had to more or less choose between Java (J2EE, wtf did this mean) and C# .NET (net, is this a network programming language)?

borkdude 2016-05-12T20:40:58.000568Z

Instead I chose a third way: work in a product company and deal with implementations for customers. About 50% tech, 50% social skills. It seemed more fun at the time.

sveri 2016-05-12T20:41:59.000570Z

And was it?

borkdude 2016-05-12T20:42:40.000571Z

Well, after 6 months I told them I wanted to do more tech. But in hindsight it was ok.

borkdude 2016-05-12T20:43:59.000572Z

You were kind of restricted in what you could do, how much you could deviate from the standard product. But we all know that limitations ignite creativity right? 😉

sveri 2016-05-12T20:44:18.000573Z

Hehe, I am working on a product for almost 5 years now

sveri 2016-05-12T20:45:25.000574Z

Its super interesting to be part of a big international company that has customers like the spanish parliament, Cocal Cola, Apple, Google and see how we work with them, but slowly I am getting bored

borkdude 2016-05-12T20:48:53.000575Z

I still find that when I'm on the phone with a customer and he/she is happy with what I made, I get the most satisfaction, direct feedback. It's what I liked most from my first job. Also what you get in lecturing for example.

sveri 2016-05-12T20:49:30.000576Z

True, positive feedback is valuable

borkdude 2016-05-12T20:50:28.000577Z

Yes, but also being able to help someone feels great.

sveri 2016-05-12T20:52:07.000578Z

Yea, thats what I love about teaching people, but when, when I think about becoming a teacher I think of all the stories my mom tells me and instantly got, nope 😄

borkdude 2016-05-12T20:52:20.000579Z

I was a lecturer for 3.5 years

borkdude 2016-05-12T20:53:29.000580Z

I went there after I got a job at the national tax service, which was very dissatisfying.

sveri 2016-05-12T20:54:02.000581Z

how old were your students?

borkdude 2016-05-12T20:54:26.000582Z

About 10-14 years younger than me probably

borkdude 2016-05-12T20:54:34.000583Z

like 17-22

sveri 2016-05-12T20:54:43.000584Z

sounds good

sveri 2016-05-12T20:55:10.000585Z

Like they would actually listen

borkdude 2016-05-12T20:55:29.000586Z

Lecturing was a good experience. I would not do it full time again though.

borkdude 2016-05-12T20:56:08.000588Z

I even taught Clojure there for two years in a row

borkdude 2016-05-12T20:57:36.000590Z

It was a university of applied science. I liked it, because it was very applied in contrast to my own education which was theoretical and didn't prepare you for real life.

sveri 2016-05-12T20:59:01.000591Z

Hehe, nothing can prepare you for the insanity of programming jobs

borkdude 2016-05-12T20:59:28.000592Z

LOL, maybe not.

sveri 2016-05-12T21:00:21.000593Z

My first job after university was like 9 months implementing features 8 hrs per day, no unit tests, hardly manual tests, just writing code all time long. In the end it was more than 100k lines of spagetthi PHP code mixed with some wanna be objects, because, hey, it was PHP 5

borkdude 2016-05-12T21:01:14.000594Z

In my years at university programming was considered dirty work, not some fun activity. A lot of fellow students did PHP/MySQL on the side, but I never felt like doing that.

borkdude 2016-05-12T21:01:43.000595Z

I always avoided PHP, like Java 😉

borkdude 2016-05-12T21:03:13.000596Z

I have done some Perl

borkdude 2016-05-12T21:03:28.000597Z

but Common Lisp, that is what got me programming for fun

borkdude 2016-05-12T21:04:21.000598Z

I was taught Miranda at university, a predecessor of Haskell. Closed source, paid license, only ran on the unix boxes.

borkdude 2016-05-12T21:04:43.000599Z

I wish they had taught Haskell, because then maybe I would have picked it up then and built some practical stuff with it.

borkdude 2016-05-12T21:08:37.000600Z

I do think those early influences are important. The idea of FP never left me

borkdude 2016-05-12T21:09:51.000601Z

FP is not given enough attention in CS education in my country.

sveri 2016-05-12T21:11:32.000603Z

Well, for me it has been mixed, we actually had haskell for one semester, but, I totally did not understand anything, it was just way beyond my reach. I got deep into C at that time and later PHP and haskell, was like, not even a "programming language" for me.

sveri 2016-05-12T21:11:49.000604Z

Today I wish I would have spent more time learning it, but, it was just not the right time for me

borkdude 2016-05-12T21:13:08.000605Z

Haskell is one of those languages that I try to learn during vacations but never really get to a point where it's addicting like Clojure.

sveri 2016-05-12T21:14:04.000607Z

The same for me, the tooling is so uninviting

borkdude 2016-05-12T21:18:06.000608Z

well that, but also the 'get all the types/monads' etc. right before you see a single result...

borkdude 2016-05-12T21:18:58.000609Z

that is the whole idea of a type checker, I know, but sometimes it helps me to see a wrong result instead of nothing

sveri 2016-05-12T21:20:12.000610Z

Also, while doing PHP I learned a valuable lesson. I wrote some code generator that created DTOs for all the database stuff and wrote the business logic in objects too. Then our inhouse customers came and wanted one page where they could see all our customers (over 700) listed plus a lot of metrics like revenue, total buys, averages over year / month and some more stuff and it was painfully slow. It took more than a minute to render it all (while the database needed a few milliseconds). Well, rewrite all the stuff to use arrays and go down to a few seconds render time...yea

sveri 2016-05-12T21:20:24.000611Z

Never trust the hype, instead, measure yourself

borkdude 2016-05-12T21:21:19.000612Z

Well, that is very good advice. Trust your own experience.

borkdude 2016-05-12T21:22:01.000613Z

Complexity sells better.

sveri 2016-05-12T21:23:21.000614Z

hehe

borkdude 2016-05-12T21:24:03.000615Z

It's true for every domain. Look at the food supplement industry.

sveri 2016-05-12T21:24:57.000616Z

How do you mean that exactly in regards to the food industry?

borkdude 2016-05-12T21:25:52.000617Z

I mean people like to believe very complex things about food (like the need for exotic food supplements) instead of the idea that you can eat very simply and need not to worry about nutrients too much.

borkdude 2016-05-12T21:26:52.000619Z

And they are willing to spend a lot of money on it.

sveri 2016-05-12T21:27:12.000620Z

Yea...well, thats what I think too. Industry needs to sell something, so you cannot go and say, stop eating all that bullshit, just a bit of the good stuff is enough, because, you dont earn money like that

borkdude 2016-05-12T21:27:25.000621Z

Exactly

borkdude 2016-05-12T21:28:56.000622Z

The trade of complexity, it works two ways: people who like to sell it and people who like to buy it.

sveri 2016-05-12T21:30:49.000623Z

I am not sure if "like" is the right word

sveri 2016-05-12T21:34:46.000624Z

My girlfriend is making a training as an alternative mediciner and while she is not into the hardcore stuff like homeopathy, still, a lot of what they learn is which food supplements they can tell the people to buy. So they get trained to "heal" like that, among other things.

borkdude 2016-05-12T21:37:10.000625Z

I like the website http://nutritionfacts.org - it has a lot of good advice and also debunks a whole bunch of stuff, all citations are available for you to check

sveri 2016-05-12T21:38:46.000626Z

Also there is a common belief that the pharma industry is just bad and tries to make as much money of the people as they can in whatever way they can. Which I share mostly. But then, they dont see that the alternative industry medicine is just doing the same

borkdude 2016-05-12T21:38:49.000627Z

I think it's good that people look to alternatives for traditional medicine. A lot of medicines are oversold, while lifestyle changes are probably a better solution.

sveri 2016-05-12T21:38:57.000628Z

thanks for the link

borkdude 2016-05-12T21:39:20.000629Z

I do use several medicines myself btw, so I'm not against pharma at all

borkdude 2016-05-12T21:39:42.000630Z

but you can do a lot by looking beyond controlling symptoms

sveri 2016-05-12T21:40:30.000631Z

Thats true, but I feel, that there is so much belief in all of it and so few knowledge

sveri 2016-05-12T21:42:54.000634Z

Funny, I am similar, moving between 85 and 93 kg by 178. I am addicted to sugar, as soon as I leave that out I get less, as soon as I consume it again, I get more

borkdude 2016-05-12T21:43:15.000635Z

The problem is not only sugar.

borkdude 2016-05-12T21:43:42.000636Z

By removing sugar from the diet, you remove a lot more crap that is in junk food like oils

borkdude 2016-05-12T21:44:51.000638Z

We are off topic btw, I'm sorry... 🙂

sveri 2016-05-12T21:46:12.000639Z

Hehe...true

seancorfield 2016-05-12T22:43:13.000640Z

Miranda… There’s a blast from the past!

seancorfield 2016-05-12T22:44:52.000641Z

I worked with Miranda (and its predecessor, SASL) back at university. And a bunch of other created-for-academia FP languages. Prof Turner, who created Miranda (and SASL and KRC), would have been my external examiner if I’d actually written up my PhD...

seancorfield 2016-05-12T22:45:38.000642Z

Back then, Miranda was very, very slow and tended to crash a lot.

seancorfield 2016-05-12T22:45:55.000643Z

Didn’t put me off FP tho’… just made me want to create a robust FP language :simple_smile: