Fork me on GitHub
#off-topic
<
2017-05-10
>
mobileink00:05:41

laff or cry?

tbaldridge00:05:22

I feel that nil gets a bad rap due to OOP and unsafe languages. Null (or nil) really isn't a big deal when you can do (type nil) and when (foo nil) is way more common than (nil foo) or (.foo nil)

tbaldridge00:05:04

I get NPEs in Clojure, but most of the time I just look one level up on the exception and see "oh yeah, I get that value out of a hash map, I wonder if the value is actually there?"

tbaldridge00:05:39

And if your functions can be polymorphic on nil, NPEs really become a non-issue

tbaldridge00:05:01

but yet, somehow thats "the billion dollar mistake" and not something like mutable objects.

fellshard01:05:34

Yeah, the central problem at the root is 'null as unallocated / unassigned'. It's used as an intermediate state before 'real use', and then used also as a placeholder arbitrarily. Without mutability, nil can be used pragmatically. Clojure (and I'm guessing other lisps) are a pragmatic take on the use of nil.

firstlast03:05:38

I’m asking this to the clojure community because I feel belonged in clojurians and thus getting inputs from the community would align with my interests. Please try to reply via thereads so that we don’t end up spamming the channel. ------ Thinking about my career

This weekend I had a sudden urge to draft a plan outlining an approach towards my future career.
I'm in my late 20's and have been a full-stack developer for the most part. I have a masters in computer science. I would have gone on to do a PHD but did not realize my (apparent) affection for research until later.

Looking back, I've drifted through jobs that have not been fulfilling enough or complex enough. I spent my time writing SPA web apps (nodejs,ReactJS, good experience and learnings) or writing enterprise software in Java (meh)

Looking ahead, I want to take a more determined approach towards what I choose to work on.

The criteria I've decided on is : Technology that is mature and will be around for a long time with high probability, solves complex-interesting problems, which currently has and will have good jobs with good pay and a side effect of which will be a gain of transferrable skills.

An example project that meets the criteria : Kafka - Kafka is mature-ish, solves complex & interesting problems (distributed systems), open source (can immediately start working on it), has jobs, decent pay and has transferrable skills relating to Java, distributed systems and data systems.

My plan is to dig deep into the technology, understand the domain, start contributing to the codebase and take up a related job.

----------------------

Any comments on the criteria  as well as suggestions for projects would be appreciated.

Please also comment on the approach as a whole and if there is a better way to go about it.

val_waeselynck09:05:38

@U4WGD1SMC: I think it depends a lot on 'how scientific' you want your job to get. For instance, contributing to Kafka probably requires a solid understanding of distributed systems, which would probably require an investinment on your part studying them!

val_waeselynck09:05:24

OTOH, there are tons of areas in IT where you can innovate without needing a specific scientific background.

val_waeselynck09:05:35

For instance, I find that the whole React + GraphQL/Falcor/Om Next + Datomic stack offers a lot of architectural opportunities, and we've barely started to explore them.

val_waeselynck09:05:06

However, I don't know how that translates into jobs, nor what will be the longlasting technologies that emerge from these approaches (React and Datomic are probably here to stay, but I don't know that they need contributions).

val_waeselynck09:05:47

I strongly recommend the book by Martin Kleppmann for getting started in this domain: Designing Data Intensive Applications (http://dataintensive.net/)

arnaud_bos07:05:32

Wow, I could have written the first two paragraphs... Hence I can offer no advice, but I'm interested in the feedback you'll receive :-)

qqq08:05:53

Deep Learning.

roberto13:05:13

re nil & Option: I side towards having an Option or Either type. Mostly for readability reasons. I can discern intent much faster when there is an either or option type when reading through code or the docs of an API. I find it especially useful when dealing with things that will throw an exception (like some network call). I’ve gotten bitten by APIs that don’t communicate that I need to handle and error explicitly. The problem with having nil do that, is that nil is too pervasive and its meaning changes from function to function, making it harder to figure out how (and if) to handle errors when calling a function.

tbaldridge14:05:32

@roberto but that's really a side-effect of incorrect API/language design, imo. (get-customer-by-id nil) may throw a NPE, but you'd get a "cast error" if you did (get-customer-by-id "42") and the id was supposed to be an int

tbaldridge14:05:01

null errors are exactly the same as any other runtime type error, it's just people don't think about how they interact with their function

tbaldridge14:05:21

I may write (fn [a b] (+ a b)) and that would blow up on a string or a null

roberto14:05:12

yes, I understand. But the issue is that when I am using a function, it might not communicate that to me in an effective way, and I might only find out about it when it blows up in prod.

tbaldridge14:05:51

But how is that different from any other type error?

roberto14:05:12

it is different in the way it communicates intent to me the developer when I’m using the function

roberto14:05:34

something that says: hey, these are the errors you need to handle when you use me

roberto14:05:52

exceptions don’t quite cut it because they don’t compose

tbaldridge14:05:09

(option doesn't really compose either)

roberto14:05:30

I beg to differ 🙂

roberto14:05:07

more specifically Either for the cases I have in mind where I have used it heavily.

tbaldridge14:05:54

Right, but you still have to handle the possible outputs of Either, you're still dealing with two possible return values, just adding another layer of abstraction on it

roberto14:05:26

yeah, which I prefer to nil because like I said: it is about communicating to the user how to work with the output

roberto14:05:57

nil can mean too many things and I’ve been bitten by it too many times.

tbaldridge14:05:15

so communication by value instead of communication via docs?

roberto14:05:46

because the docs might not even be there and get out of sync

roberto14:05:58

but the code won’t lie, especially if using an IDE

tbaldridge14:05:42

but that's just adding a different name for the same thing. Look at JS's "undefined", great now I have to handle "== null or ==undefined". Let's say get returned ::not-found, or ::not-a-map now I have to dispatch on 3 things.

roberto14:05:06

yeah, and I’m fine with that if the compiler forces me to do that

roberto14:05:17

I don’t want to have to find out about it until things break in prod

tbaldridge14:05:57

And that doesn't compose, since now I can't simply do (-> (get mp :e) (get :a) (get :r))

dpsutton14:05:58

well, wouldn't you need to then have

(try
     (cond
       (left option (do thing ...
       (right option (do thing ...
     (catch exception
since beyond your option types, the presence of null's can still haunt you?

roberto14:05:22

sorry, if you use a good abstraction, you can compose

fellshard14:05:40

Can, but Clojure's functions trend towards using them smartly.

roberto14:05:33

why would you add a try-catch there?

tbaldridge14:05:16

And that's the problem...I just don't get NPEs in production. Parse errors, data validation errors, etc, but never a NPE. I get them in development, but that's what unit/integration tests are for.

roberto14:05:44

I get them in prod, especially ones that you can’t predict ahead of time when dealing with third party services

tbaldridge14:05:06

So in the end trying to remove NPEs is just a ton of bookeeping for something that's not a problem. I'd rather handle 10 NPEs than annotate every callsite with an Either/Option/etc.

roberto14:05:07

I’ve been bitten by this working with third party services that were poorly documented and we only found out about the error cases in prod.

dpsutton14:05:20

becaues an option or either type doesn't remove the presence of NRE's

roberto14:05:30

but having an internal library that codified the possible errors and forced the users of the libs to always handle those helped a great deal

tbaldridge14:05:37

a static compiler aint gonna help you with 3rd party services being poorly documented.

tbaldridge14:05:47

If they can't write good docs, they aren't going to properly handle nils

roberto14:05:59

I know, but it allows us to write our libraries and communicate intent clearly to users

tbaldridge14:05:03

or properly return errors. They'll just say "internal error".

dpsutton14:05:14

> but having an internal library that codified the possible errors i'm not sure this is possible in the type systems of java or clojure

roberto14:05:26

yeah, not possible in clojure, we did that in kotlin

tbaldridge14:05:31

@dpsutton anything can be done with spec 😛

roberto14:05:59

yeah, spec doesn’t really solve the same issue for me

dpsutton14:05:01

i'm waiting for that to be non alpha

tbaldridge14:05:12

In a sense though, I'm not joking...when you have predicates, you literally have the power of the language.

roberto14:05:17

i find it much more complicated than an ML-like type system

roberto14:05:07

I understand the potential but I find the UX a bit hairy right now

roberto14:05:30

and I’m having a hard time using it properly

tbaldridge14:05:18

yeah, there's room for improvements, personally I'd like to see some "is-a" logic, and something like contravariance, but I'm sure that stuff will come with time

roberto14:05:19

it also ends up being more verbose than just writing types

roberto14:05:39

yeah, that would be great, I think it will only get better

john19:05:19

What's the best test framework to use with spec? clojure.test? Or some 3rd party test lib?

john19:05:45

Or is there a good doc out on how to integrate spec with a testing framework?

john19:05:52

Or any example of a project that has "full test coverage," that also uses spec.

john19:05:24

The official doc looks pretty good: https://clojure.org/guides/spec#_testing But any other examples would be great. I'll ask this over in #clojure-spec too.

john19:05:52

Anyone noticed google search results getting worse over the past year? Lately, when I modify my search query, I still get mostly the same results. Whereas before, slight modifications to the query could result in very different results, which was useful in some cases.

mobileink20:05:54

don't worry, they know what you need.

mobileink20:05:17

do you still get the same ads? or ads for thevthing you googled yesterday or three weeks ago?

mobileink20:05:52

i tried duckduckgo for a while but it just got annoying.

mobileink20:05:44

try creating a new gmail acct and searching from it. haven't tried myself cause i'm lazy. but it would be interesting to know.

mobileink21:05:55

thanks, i'll give it a try.

mobileink21:05:23

what i want is a search box that will randomly pick a search engine, disguise my identity, and let me slap "n" to try the next search engine. is that so much?

john21:05:52

@mobileink hmm, duckduckgo seems to return similar search results... Maybe google search results are changing in general. The results just seem more programmer friendly than a while back. Search terms not necessarily related to programming seem to have a higher rate of returning programming related results. I figured it was just learning about me.

john21:05:18

same goes for other topics I search regularly

mobileink21:05:17

interesting. could mean the web is changing, insofar as the goog is driven by link.

mobileink21:05:04

not sure i like that. simple_smile

john21:05:27

Well, I was worried that I was creating a search bubble for myself - occluding potentially relevant results that I would have otherwise seen. Maybe the link space is changing though, like you say.

mobileink21:05:44

it's biological, really. always adapting.

mobileink21:05:16

i want a metasearch!

john21:05:27

It's definitely an extension of the human cerebral cortex, of sorts

mobileink21:05:16

i was thinking more along the lines of populations in environments.

mobileink21:05:43

we're the population of organisms. the web is the env. we mutually adapt.

john21:05:12

right. makes sense

john21:05:24

Yeah, lots of cognitive ability is being replaced by the web. I'm convinced that 10 years ago, before ubiquitous GPS navigation, I had a very different cognitive grasp of my own location with respect to surrounding towns and nearby locations. Like actually looking at a map. Nowadays, not so much. Now I don't care about the zig-zag pattern it takes to get to some local store. If I do it enough times, it'll start to stick, but I never try to make it stick. Whereas years ago, everyone used to establish directions, either on paper or in their head, prior to leaving for a destination.

john21:05:26

10 years ago, we were all much more like taxi cab drivers that understood their surroundings. Nowadays, we're all like kids that get chauffeured around by GPS taxi drivers. But we still do the driving (for now 🙂 )

mobileink21:05:45

haven't had a drivers license for 15 years. happiness.

john21:05:33

Yeah, so you're already living it 🙂

wiseman22:05:18

@john are you using verbatim search?

wiseman22:05:07

that can make a big difference.

john22:05:59

verbatim? like a quoted "search term"?

wiseman22:05:54

Tools -> All results -> Verbatim

wiseman22:05:26

there’s quite a bit more guessing about what google thinks you really wanted without that setting.

john23:05:31

nice, I'll try that

kenny23:05:55

Hi. How do you guys find a good interaction and visual designer? I am working on a startup and we are struggling to find a good, trustworthy designer. We want someone that will work with us through the entire app design process -- from a req's sheet to high-fidelity mocks. And someone who has done this before that understands you can't skip from ui flow diagrams to high-fidelity mocks. I really want to find someone that is able to work with us along every step of the app creation process. We have already started an engagement with one firm, but it is not going too well. The firm does not seem to have a good knowledge of the app design process, so we are probably going to end the engagement in a few days. Does anyone have any recommendations? (i.e. websites to look for designers on, a freelancer you know, etc.)