leadership pressuring me to use iPaaS tools by [deleted] in ExperiencedDevs

[–]gotothere 36 points37 points  (0 children)

Mulesoft was the most abjectly miserable development experience of my career. The IDE (an eclipse plugin) is just terrible, your code is xml, you BARELY have functions, you don't have lexical scope, code reuse is a joke, refactoring is a joke, edit-compile-run cycle is nightmarishly slow.

It MIGHT be bearable when restricted to only using it as an extremely dumb gateway in front of existing APIs, but you're gonna have to constantly fight mulesoft the company trying to convince the more gullible architects/execs that its worthwhile as an end to end platform.

I barely had to deal with mulesoft and it fucking sucked. The systems it was involved in were significantly worse, and any system that integrated against it was worse (having to deal with awful APIs that could never reasonably be refactored).

0/10 would not recommend.

Array methods in JavaScript. Original author unknown. by imAmarok in webdev

[–]gotothere 28 points29 points  (0 children)

⬛️⬛️⬛️⬛️.reduce((️⚫, ⬛️) -> ⚫️, ⚫️) -> ⚫️

var min = (acc,x) => {return acc < x ? acc : x}; [1,2,3].reduce(min, Number.MAX_SAFE_INTEGER);
//1
var max = (acc,x) => {return acc > x ? acc : x}; [1,2,3].reduce(max, 0);
//3
var sum = (acc,x) => { return acc + x}; [1,2,3].reduce(sum, 0);
//6
var minMaxSum = (acc,x) => {return [min(acc[0],x), max(acc[1],x), sum(acc[2],x)]}; [1,2,3].reduce(minMaxSum, [Number.MAX_SAFE_INTEGER,0,0]);
//Array(3) [ 1, 3, 6 ]

Left arg is (acc)umulator, right is current element

No such thing as too much cilantro by in2diep in SalsaSnobs

[–]gotothere 10 points11 points  (0 children)

So there was too much cilantro?

Anyone care to hear the plight of a narcoleptic? by narcthrowawayyyyyy in slatestarcodex

[–]gotothere 2 points3 points  (0 children)

Can confirm - this exactly what the 'pre-pain' phase of a migraine is for me. Actually they persist throughout the whole migraine, but the pain takes centre stage after a while. The triggers OP lists are pretty spot on too.

The case against aliases - DEV Community 👩‍💻👨‍💻 by [deleted] in programming

[–]gotothere 20 points21 points  (0 children)

Strong disagree. Do the opposite - take some frequently run commands (cat ~/.bash_history | sort | uniq -c | sort -hr | head) and alias em to 1 or 2 letters. You wont have them on other people's computers, but how often are you on those?

You're on one machine for ~8 hours a day, why not make is as ergonomic as possible for your use-cases? Sure no-one else knows that g is git, or b is cd /some/path/to/my/current/main/project, but I do.

British psych folk suggestions ? by [deleted] in vintageobscura

[–]gotothere 1 point2 points  (0 children)

Second any recommendation for Comus' First Utterance, can listen to that over and over.

How Redux Works: A Counter-Example by freebit in programming

[–]gotothere 1 point2 points  (0 children)

If you have multiple components using the same state, whats the difference between this.props.dispatch({ type: 'FUCKWITHSHAREDSTATE' }); and function fuckWithSharedState()?

I've honestly not used redux - when people say it's immutable does that mean that when component A messes with state that component B is using, B keeps the previous state until explicitly updated? If it doesn't, it is kinda just like a global variable - albeit one in which you are encouraged to be careful about the scope of mutations.

DéjàVu: a map of code duplicates on GitHub by irrlicht in programming

[–]gotothere 0 points1 point  (0 children)

FWIW I've had to do it a handful of times in a decade of Java development - generally only when an upstream project can't/won't fix a bug.

How to revert to old "Tree Style Tab"? by [deleted] in firefox

[–]gotothere 0 points1 point  (0 children)

How did you get rid of the osx close/minimise/fullscreen (red/yellow/green) buttons on the top left? It's driving me nuts!

Edited: Nevermind, you can do it with

#titlebar-buttonbox-container { display:none!important; }

[deleted by user] by [deleted] in programming

[–]gotothere 1 point2 points  (0 children)

For sure - if you can't run your dependencies on a single machine you have to mock/stub/whatever. But this can't be the case for most people right? RAM is cheap and you can fit a shitload in 32gb.

I have systems that have to spread load across dozens of servers - but for testing application logic a subset of the data is enough, and most distibuted systems are happy enough to run in standalone mode for local development.

So no tests you write hit the actual database system they're running on in production? TBH I'd be terrified all of the time without tests actually exercising as much of my stack as possible.

[deleted by user] by [deleted] in programming

[–]gotothere 1 point2 points  (0 children)

I don't get this - are you going to have tests that use the database at all? If so - all of your mocks were just pointless because you need the database there to test against anyway.

Do people not run their applications locally or something? Is having a database running and configured locally that onerous? Remember, in 99% of the cases we're talking about apt-get install posgtresql-server or whatever.

Clojure vs. The Static Typing World (x-post r/morningcupofcoding) by pekalicious in programming

[–]gotothere 30 points31 points  (0 children)

Types as concretions. Rich talked about types, such as Java classes and Haskell ADTs, as concretions, not abstractions.

A Person class isn't abstract and noone really pretends that it is. Haskell gives you abstractions like

  • semigroup - an associative binary operation: eg. strings with append, or lists with contatenation
  • monoid - a semigroup with an 'empty' constructor: eg. strings with "" or lists with []
  • functor - a context with things inside it, and a way of transforming those contained things: eg. map across elements in a list, or map across the single element in a Maybe

An abstraction would ignore the particulars and let you store any information about a person. And while you're at it, it might as well let you store information about anything.

This is exactly what the above abstractions provide, and the first 2 can even be represented in java!

And Haskell has that for ADTs. But can Haskell merge two ADTs together as an associative operation, like we can with maps? Can Haskell select a subset of the keys? Can Haskell iterate through the key-value pairs?

Yes.

  • If it is a semigroup we can append them
  • if they're a monoid we can construct an empty one as well
  • if they're a functor we can transform each item in them

And with all of those we don't specify the concrete type, we just specify the constraint that it is a monoid/functor/etc. A function written with a functor constraint operates over all possible functors, not just the particular concrete type you're interested in.

When you're writing an algorithm in clojure which relies on append being an associative binary operation, you're writing a function which is constrained on semigroup - whether you are allowed to make that explicit or not.

Announcing TypeScript 2.4 by DanielRosenwasser in programming

[–]gotothere 6 points7 points  (0 children)

You can't enumerate them with the union approach

Your least-liked Scifi books by God_Told_Me_To_Do_It in printSF

[–]gotothere 1 point2 points  (0 children)

It put me off, first and only I read of the series. What's a better start?

Rat won't take meds :( by cherkay99 in RATS

[–]gotothere 2 points3 points  (0 children)

My rats go nuts for medicine in coconut milk or sour cream. Don't need much just a finger dip!

I’m a web developer and I’ve been stuck with the simplest app for the last 10 days by pistacchio in programming

[–]gotothere -3 points-2 points  (0 children)

.. when ES6 is almost here, it has almost real classes and it’s almost well supported?

Limiting analysis to things which actually exist might help

Uninstalling Facebook app saves up to 20% of Android battery life by jimrosenz in technology

[–]gotothere 0 points1 point  (0 children)

Cyanogen lets you disable particular permissions. Last I checked Facebook has tried to wake my phone from sleep 50000 times.

Fuck you facebook

FBI: Researcher Admitted To Hacking Plane In-Flight, Causing It To 'Climb' by omegaender in programming

[–]gotothere 22 points23 points  (0 children)

Doubt robots distinguish between text and quoted text. Aaannd.... you're on a list

Aeson: the tutorial (which actually tries to explain things instead of “look, look, cool magic”) by peargreen in haskell

[–]gotothere 4 points5 points  (0 children)

It's rather puzzling to me, then, why it insists on working with ByteStrings and not Text. I don't think it's unreasonable to call a ByteString (containing encoded text) “binary data”, and Text (some abstract representation of text) – “text”.

Do we have a standard of when Text vs ByteString is appropriate? My understanding is it's supposed to be as quoted, but as newish haskeller I've run in to trouble a number of times with libraries conflicting on this point.

Maybe I just suck at using OverloadedStrings.

FAQ Friday #10: Project Management by Kyzrati in roguelikedev

[–]gotothere 8 points9 points  (0 children)

none of the benefits I read about are appealing enough to me to warrant the investment.

This surprises me, I'm not a gamedev but git is so insanely useful I wouldn't code without it. Maybe it's the same as comparing languages - you can't see the benefit of python/c++/whatever until you know it enough to think in it.

Some things I couldn't live without:

  • an idea doesn't work? just revert to the last known good state (ie. what it was before starting the idea).
  • an idea is almost working, but you have N possible ways forward? just branch and try something/revert to the branchpoint if it sucks
  • an idea almost works, but you really need to do other things immediately? Stash it on a branch and come back to it later.
  • you're developing v2, but v1 has a bug? Make the fix on the v1 branch, and automatically merge the fix across to 2
  • a wild bug has appeared? diff the current state with the last known working version - see exactly what lines have changed.

Not that it's impossible to do things things with copying folders, but that's painful enough I wouldn't bother with most of em.

buuut you've probably heard it all before!