Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "functional programming"
-
The project where I realized I wanted to go from chemist to pro dev.
I built a flow-chemistry spectrometer with monitoring backend in Haskell.
Spectroscopy is where you add a reagent to a glass tube, it changes color, and by measuring the exact color it tells you how much of something (for example, a toxin) is present in the sample.
I had to do that a lot on factory samples, writing down measurements using pen & paper.
I'm lazy so I decided to do the logical thing: Automate it. I bought a second hand spectrometer, stripped the casing, did a shitload of glassblowing and hooked up tubes to the production pipelines, so I could get samples, mixing them in the correct ratio with reagents in continuous flows using valves.
I ended up using 2 home-crafted arduino-like boards (etching PCBs is fun!).
One to calibrate the mixture against known samples and control solenoid valves to continuously cycle through various reagents and deionized flushing water, the other to record the measurements and send them to a server running a Haskell/Yesod API.
The server collected the information into InfluxDB (A time series database), displaying all data on a graphite dashboard.
Eventually I wrote Haskell plugins for most of the chemistry processes, from pH & temperature measurements to polymer property and pigment tests (they made a lot of printer ink).
Then I was fired because they didn't need chemists anymore, and the code "could be maintained by the intern" (poor guy)...
But I did find out that I loved functional programming, chemistry automation projects, and crafting my own electronics during that time.16 -
Manager: I read an article today
Dev: oh here we go….
Manager: We must pivot to only functional programming, which means only using functions instead of classes
Dev: Actually functional programming is a bit more nuanced tha—
Manager: Any use of classes going forward is not allowed. Everything must use functions! Classes are an outdated way of programming, using classes is why we continue to miss our deadlines. Functional programming is lean, classes are waterfall.
Dev: What about the libraries we use? Many of those use classes
Manager: Wrap them in a function then, that way they are pure which is one of the requirements of functional programming. You would know that if you spent as much personal time as I do keeping up with the times.34 -
When I started to learn functional programming I asked myself: "What the hell is this?"
Fast forward a couple of years, I still wonder what 'this' is.7 -
So, today I was at my college library, working on an Haskell project that I have for my Functional Programming class. Library's packed and no seats are available, when the lady that works there passes behind me and says:
"There's people that want to study, if you're gonna be playing on your laptop please leave."
What? Excuse me? Are we in the 21st century or what?
How does a lady that works at a library, on an Engineering College, for more than 10 years, doesn't...
Screw it, I just laughed so hard and proceeded working.
Oh and by the way, first time posting on here!12 -
Why are job postings so bad?
Like, really. Why?
Here's four I found today, plus an interview with a trainwreck from last week.
(And these aren't even the worst I've found lately!)
------
Ridiculous job posting #1:
* 5 years React and React Native experience -- the initial release of React Native was in May 2013, apparently. ~5.7 years ago.
* Masters degree in computer science.
* Write clean, maintainable code with tests.
* Be social and outgoing.
So: you must have either worked at Facebook or adopted and committed to both React and React Native basically immediately after release. You must also be in academia (with a masters!), and write clean and maintainable code, which... basically doesn't happen in academia. And on top of (and really: despite) all of this, you must also be a social butterfly! Good luck ~
------
Ridiculous job posting #2:
* "We use Ruby on Rails"
* A few sentences later... "we love functional programming and write only functional code!"
Cue Inigo Montoya.
------
Ridiculous job posting #3:
* 100% remote! Work from anywhere, any time zone!
* and following that: You must have at least 4 work hours overlap with your coworkers per day.
* two company-wide meetups per quarter! In fancy places like Peru and Tibet! ... TWO PER QUARTER!?
Let me paraphrase: "We like the entire team being remote, together."
------
Ridiculous job posting #4:
* Actual title: "Developer (noun): Superhero poised to change the world (apply within)"
* Actual excerpt: "We know that headhunters are already beating down your door. All we want is the opportunity to earn our right to keep you every single day."
* Actual excerpt: "But alas. A dark and evil power is upon us. And this… ...is where you enter the story. You will be the Superman who is called upon to hammer the villains back into the abyss from whence they came."
I already applied to this company some time before (...surprisingly...) and found that the founder/boss is both an ex cowboy dev and... more than a bit of a loon. If that last part isn't obvious already? Sheesh. He should go write bad fantasy metal lyrics instead.
------
Ridiculous interview:
* Service offered for free to customers
* PHP fanboy angrily asking only PHP questions despite the stack (Node+Vue) not even freaking including PHP! To be fair, he didn't know anything but PHP... so why (and how) is he working there?
* Actual admission: No testing suite, CI, or QA in place
* Actual admission: Testing sometimes happens in production due to tight deadlines
* Actual admission: Company serves ads and sells personally-identifiable customer information (with affiliate royalties!) to cover expenses
* Actual admission: Not looking for other monetization strategies; simply trying to scale their current break-even approach.
------
I find more of these every time I look. It's insane.
Why can't people be sane and at least semi-intelligent?18 -
Functional Programming literally has 'fun' in the title; OOP is one letter away from 💩. I rest my case.5
-
A is for Assembly, a wizard's spell
B is for Bootstrap, so bland and the same. And also for Brainf*ck, will blow you away
C is for COBOL, your grandad knows that
D is for daemon, your server knows what
E is for Express.js, you node what is coming
F is for FORTRAN, which is perferct for sciencing
G is for GNU which is GNU not UNIX
H is for Haskell using functional units
I is for Intance, An action of Object
J is for Java plays with them Always
K is for Kotlin, Android's new toy
L is for Lisp, scheming a ploy
M is for Matlab, who knows how it works
N is for Node a bloatware of code
O is for Objective Pascal, you did not expect that
P is for programming, we all love to do that
Q is for Queries, A database is made
R is for R, statistics are great
S is for Selenium, you have to test that
S is for Smalltalk, let's make it all brief
T is for Turing Test, how human is this?
U is for Unix, build with all talents
V is for Visual Studio, built with all laments
W is for Web, lets build something cool
X is for XHTML, remember all that?
Y is for Y2K, I'm tired as f*ck
Z is for Zip, let's zip is all now.
Get yourself coffee and back to the grind.8 -
It seems like every other day I run into some post/tweet/article about people whining about having the imposter syndrome. It seems like no other profession (except maybe acting) is filled with people like this.
Well lemme answer that question for you lot.
YES YOU ARE A BLOODY IMPOSTER.
There. I said it. BUT.
Know that you're already a step up from those clowns that talk a lot but say nothing of substance.
You're better than the rockstar dev that "understands" the entire codebase because s/he is the freaking moron that created that convoluted nonsensical pile of shit in the first place.
You're better than that person who thinks knowing nothing is fine. It's just a job and a pay cheque.
The main question is, what the flying fuck are you going to do about being an imposter? Whine about it on twtr/fb/medium? HOW ABOUT YOU GO LEARN SOMETHING BEYOND FRAMEWORKS OR MAKING DUMB CRUD WEBSITES WITH COLOR CHANGING BUTTONS.
Computers are hard. Did you expect to spend 1 year studying random things and waltz into the field as a fucking expert? FUCK YOU. How about you let a "doctor" who taught himself medicine for 1 year do your open heart surgery?
Learn how a godamn computer actually works. Do you expect your doctors and surgeons to be ignorant of how the body works? If you aspire to be a professional WHY THE FUCK DO YOU STAY AT THE SURFACE.
Go learn about Compilers, complete projects with low level languages like C / Rust (protip: stay away from C++, Java doesn't count), read up on CPU architecture, to name a few topics.
Then, after learning how your computers work, you can start learning functional programming and appreciate the tradeoffs it makes. Or go learn AI/ML/DS. But preferably not before.
Basically, it's fine if you were never formally taught. Get yourself schooled, quit bitching, and be patient. It's ok to be stupid, but it's not ok to stay stupid forever.
/rant16 -
Imagine yourself exploring Medium, looking for some new awesome tools to try out.
You accidentally find the new, promising programming language. It called Blow. It promises itself to be “idiomatic”, “minimalistic”, “simple” and “handsome”. And it also compiles to Electron. You decide to give it a try.
It has its own package manager, simple and idiomatic – every package is “blow add” away. But it’s only three packages available: the “blowsay”, just like “cowsay”, the “this”, printing The Blow Manifesto and “blue”, which is simplistic, simple and minimalistic idiomatic handsome functional frontend framework built with simplicity in mind.
You want to build a todo app, so you type “blow add blue” and press enter.
Following Medium articles written by some guy wearing Ray-Bans, you managed to finally put a todo app together, after seven hours of straight up coding and fighting that simple and idiomatic syntax, trying to make it do what you need. Alright, it’s time to build it.
It has built-in task runner named “job”.
So you type “blow job todo”.
You spending three hours more doing “blow job this”, “blow job that”, trying to blow job everything you see. You’re tired and mad at those damn blow job hipsters created that. You literally suck at programming in that.
Everything falls apart. Things doesn’t work. And after another “ENOENT 0() 0x628 NOT_SUPPORTED”, you give up, admitting that you’ve really sucked at this.6 -
The exact moment when I understood what programming actually was.
I was getting hard times at my 3rd college grade, trying to implement the recursive sudoku solver in python. Teacher spent a lot of time trying to explain me things like referential transparency, recursion and returning the new value instead of modifying the old one and everything related. I just couldn't get it.
I was one of the least productive students, i couldn't even understand merge sort.
I was struggling with for loops and indexes, and then suddenly something clicked in my head, like someone flipped a switch, and i understood everything i was explained, all at once. It was like enlightenment, like pure magic.
I had sudoku solver implemented by the end of the lecture. Linked list, hash map, sets, social graphs, i got all of these implemented later, it wasn't a problem anymore. I later got an A for my diploma.
Thank you @dementiy, you were the reason for my career to blast off.7 -
PM: Guys, we have to upgrade Java 8
Me: hey check out all these cool functional programming stuff (lambdas)in Java 8.
PM: Sorry you can't do that. Our automated testing software isn't up to date to test Java 8. So you have to code it "vanilla"
Me: Erm, upgrade it?
PM: we didn't budget it for that.
Me: *thinks to me miself* brilliant8 -
This page doesnt look like much until I tell you it is written entirely in Clojure using a custom built HTML generator.9
-
#+BEGIN_QUOTE
What’s 5 plus 2?
7.
Correct.
What’s 5 plus 3?
8
Nope. It’s 10, because we turned 5 into 7, remember?
#+END_QUOTE1 -
Let the student use their own laptops. Even buy them one instead of having computers on site that no one uses for coding but only for some multiple choice tests and to browse Facebook.
Teach them 10 finger typing. (Don't be too strict and allow for personal preferences.)
Teach them text navigation and editing shortcuts. They should be able to scroll per page, jump to the beginning or end of the line or jump word by word. (I am not talking vi bindings or emacs magic.) And no, key repeat is an antifeature.
Teach them VCS before their first group assignment. Let's be honest, VCS means git nowadays. Yet teach them git != GitHub.
Teach git through the command line. They are allowed to use a gui once they aren't afraid to resolve a merge conflict or to rebase their feature branch against master. Just committing and pushing is not enough.
Teach them test-driven development ASAP. You can even give them assignments with a codebase of failing tests and their job is to make them pass in the beginning. Later require them to write tests themselves.
Don't teach the language, teach concepts. (No, if else and for loops aren't concepts you god-damn amateur! That's just syntax!)
When teaching object oriented programming, I'd smack you if do inane examples with vehicles, cars, bikes and a Mercedes Benz. Or animal, cat and dog for that matter. (I came from a self-taught imperative background. Those examples obfuscate more than they help.) Also, inheritance is overrated in oop teachings.
Functional programming concepts should be taught earlier as its concepts of avoiding side effects and pure functions can benefit even oop code bases. (Also great way to introduce testing, as pure functions take certain inputs and produce one output.)
Focus on one language in the beginning, it need not be Java, but don't confuse students with Java, Python and Ruby in their first year. (Bonus point if the language supports both oop and functional programming.)
And for the love of gawd: let them have a strictly typed language. Why would you teach with JavaScript!?
Use industry standards. Notepad, atom and eclipse might be open source and free; yet JetBrains community editions still best them.
For grades, don't your dare demand for them to write code on paper. (Pseudocode is fine.)
Don't let your students play compiler in their heads. It's not their job to know exactly what exception will be thrown by your contrived example. That's the compilers job to complain about. Rather teach them how to find solutions to these errors.
Teach them advanced google searches.
Teach them how to write a issue for a library on GitHub and similar sites.
Teach them how to ask a good stackoverflow question :>6 -
Don't get me wrong, I like funcional programming, but this smug „This would neeever happen with FP“ bullshit really gets on my nerve and kind of turns me off the idea of ever wanting to work with FP programmers.
It's just another paradigm, it's still possible to write unmaintainable fuckugly crapcode with functional programming.
And it is still very possible to write beautiful, clean, well maintainable code with OOP. Get over yourselves and understand that it's a tool and not a religion, and a good dev should know when to pick which tool for which job without childish notions of intellectual superiority.4 -
Functional Programming. Because Moores Law has moved from making processors faster to multiplying cores, and we may eventually have to code on machines that have 1024 cores or more. Mutable state will cause all kinds of hell in those scenarios. We already have problems with it when we have like 2-3 different threads.4
-
Once I watched a 30min YouTube video on functional programming just because the presenter was cute. 😘
Anyone ever did this ???
And btw the video is Functional programming by Anjana vakil.13 -
1h into learning Haskell and I haven't written a single hello world example yet
Change feels good
I already love it12 -
I really like programming in Haskell.
Everyone I know seems to hate it (or prefer to work with oo-languages)
Any friendly Haskeller here who wants to collab/teach/learn from each other? ._.'8 -
I'm working on a programming language with a "bytecode" interpreter and a compiler that translates source code to said bytecode and... it sort of actually works!
I want to recreate an Erlang-style environment, currently you can write functions, call C++ functions via wrappers, have immutable-only values, and it has no explicit control structure apart from statement sequencing and the if-expression because I want to make it as functional as possible. Next thing on the list is to add a green threads implementation and ability to spawn and send messages to processes.
Still a WIP and heck even design-in-progress.
Now for the rant:
I'm using CMake for building C++ (interpreter) and Stack for Haskell (compiler) and I've been trying to get them to talk to each other for hours because I want CMake to manage the Stack build too and shove all the executables into one place. CMake documentation is weird and Stack isn't too helpful either, so I guess I'll just spend another few hours trying to get Stack to fuckin reveal its build directory to CMake and/or build to a given directory. Ugh.8 -
When I started programming Batch Files I decided to go big and and make an Batch Program with a fully functional UI system. Just when I had finished the first menu I kept getting a "goto was unexpected at this time" or something like that. I did everything I could to see about debugging until I finally cleared my calender and spent the next week debugging. A week of debugging goes by and I see someone coding in color rather then black and white at my school. I walk up to him and ask. "What language is that?" To which he replies "Batch". I asked him how he got Notepad to be in color and he simply pointed to the top left of the screen and it said Notepad++.
I get home later that day and look up "Notepad++" and download the first thing I see. I install the .msi file and I see a language bar at the top of the screen. Set it to batch, and drag my .bat file into the program to see six of my dividers are red bars. I look this up and see there's another spacing option "echo.", I replace my current spacers with this and the whole thing starts working. Fml, that's a week I'm never gonna get back3 -
One of the biggest barriers to the wide(r) scale adoption of functional programming languages like Haskell, F#, and Scala is how snooty and condescending your average FP developer is. And beginner-unfriendly.
Ask them a question about an intermediate topic (in my case, the Free monad) you're likely to get a whole torrent of category theoretic rubbish in return.
This is a common pattern I see when "experts" answer questions.
Now, it didn't bother me much because I've studied a fair amount of category theory and can usually follow such answers, but, for the sake of the general case, I'd like to shove these rules into the heads of everyone writing an answer to a question (not just FP):
1. If you can't illustrate a concept clearly without going into verbal diarrhoea with phrases like "monad homomorphism" and "just a monoid in the category of endofunctors" then you clearly haven't understood it properly (unless, of course, the answer absolutely requires it). An answer is not the place to show off your knowledge of a topic.
2. Please remember that everyone was a beginner at some point. Including you. Understand that some concepts can be extremely frustrating at first and yet incredibly simple after you grok them (eg. monads).
3. If the person asking the question is a beginner, using complex concepts in an answer just because it's a more "elegant" way to explain it doesn't really help them. They are more likely to get confused and drop the topic.
(Kudos to those people who give highly relevant, insightful, simple, and intuitive answers, you guys are the best).2 -
You know what really pisses me off about the dev community is the circle jerk that ensues when someone bashes something they have no experience in. Take yesterday's React bash on Reddit and DevRant. Thomas Fuchs compared React and JSX to the intermingling of HTML CSS and JS of 15 years ago. If you knew anything about React or spent 1 hour learning what it's about you would immediately know why that isn't true but no, a giant circle jerk ensued comparing it to PHP! I'm sorry but HOW can you compare a pure JS view library that is renderable by the browser, to a full fledged server side language?? Not to mention the React approach uses a completely different programming paradigm of functional programming.
When I first saw React and Redux I realized what this is all really about, a shift in the paradigms of programming. React + Redux is the first time that functional programming has entered mainstream. We've had functional programming available to us via Haskell and more recently Clojure for a while now but it was never very obvious how powerful functional programming could be outside of the niche that used it for more analytical type tools. Now we have things like hot reloading (https://youtube.com/watch/...) and state playback (https://youtube.com/watch/... skip to ~3min to watch the magic) thanks to immutable state.
Before you decide that React is just another flavor of the month library I encourage you to learn about the advantages that functional programming provides (https://medium.com/@cscalfani/...) and checkout Elm (http://elm-lang.org/) as well. The nice thing about React + Redux is that it gives us a way to start programming functionally, without having to learn ML style syntax like Elm and ClojureScript. Keep in mind, when Object Oriented Programming was becoming popular it was widely controversial as well and look at all it has done for us.4 -
Functional Programming literally has 'fun' in the title; OOP is one letter away from 💩. I rest my case.4
-
Which side are you on? Lolundefined coding style engineer devrant functional programming programming programmer engineering javascript rant coding function30
-
The sad thing is no matter what we do we are all a variation of homer 😂🤣
Borrowed from https://medium.com/@cscalfani/...1 -
How to profesionally say: you fucking illiterate and incompetent piece of shit, I am tired of spoonfeeding you because you dont use your fucking brain. I am fucking tired of explaining same concept over and over again for the past 2-3 months. Open fucking google for once and lookup latest practices, and learn what functional programming is and learn how to use operators instead of fucking inventing wheel again and again with your 100 lines boilerplate of code functions. Open your fucking mind for once and lookup stuff for yourself, instead of asking me to explain everything for the 100th time you lazy fuck. Oh and stop asking me "to be nice", this is gaslightling. I am being professional and I am the only person in this company who actually tolerates u on some level, others are just avoiding you you useless piece of shit. If I need to explain something for 5th time and I make you feel bad, it means you should feel bad. So maybe grow some balls and start putting in some effort, instead of playing the victim when you are the supposed 6 year senior and I am the 3 year junior, who has to do your fucking job half of the time. You are incapable of even using the standard architecture, what you use is fucking 6-7 years old. Fucking code monkey with broken english who doesnt understand what hes doing. You dont like my methods? I dare you to schedule an appointment between me and manager or your useless techlead, but I know you wont do that because I know you are afraid of everyone finding out how incompetent you are. You low fruit hanging task licking incompetent shit.1
-
Structure: decades of programming in too many languages to enumerate. I lean functional, but only when the language doesn't fight it. No matter what I'm doing, my code is immutable in practice, if not paradigm.
Syntax: No one thing in particular. I code differently depending on the language.
When I start learning a language, I'll find the standard style checker and create a project where I write an example of every single rule.
The end result is generally a quick intro to the language and a bonus understanding of the hot sports opinion in said language. I call this an ocean boiler.
I lean heavily into autoformatting because I've worked on too many projects to care, and I have a general expectation that something which is important enough to make a code standard is important enough to be enforced in tooling. I'd rather spend my time solving problems that thinking about stylistics.5 -
"I'm almost done, I'll just need to add tests!"
Booom! You did it, that was a nuke going off in my head.
No, you shouldn't just need to add tests. The tests should have been written from the get go! You most likely won't cover all the cases. You won't know if adding the tests will break your feature, as you had none, as you refactor your untested mess in order to make your code testable.
When reading your mess of a test case and the painful mocking process you went through, I silently cry out into the void: "Why oh why!? All of this suffering could have been avoided!"
Since most of the time, your mocking pain boils down to not understanding what your "unit" in your "unit test" should be.
So let it be said:
- If you want to build a parser for an XML file, then just write a function / class whose *only* purpose is: parse the XML file, return a value object. That's it. Nothing more, nothing less.
- If you want to build a parser for an XML file, it MUST NOT: download a zip, extract that zip, merge all those files to one big file, parse that big file, talk to some other random APIs as a side-effect, and then return a value object.
Because then you suddenly have to mock away a http service and deal with zip files in your test cases.
The http util of your programming language will most likely work. Your unzip library will most likely work. So just assume it working. There are valid use cases where you want to make sure you acutally send a request and get a response, yet I am talking unit test here only.
In the scope of a class, keep the public methods to a reasonable minimum. As for each public method you shall at least create one test case. If you ever have the feeling "I want to test that private method" replace that statement in your head with: "I should extract that functionality to a new class where that method public. I then can create a unit test case a for that." That new service then becomes a dependency in your current service. Problem solved.
Also, mocking away dependencies should a simple process. If your mocking process fills half the screen, your test setup is overly complicated and your class is doing too much.
That's why I currently dig functional programming so much. When you build pure functions without side effects, unit tests are easy to write. Yet you can apply pure functions to OOP as well (to a degree). Embrace immutability.
Sidenote:
It's really not helpful that a lot of developers don't understand the difference between unit, functional acceptance, integration testing. Then they wonder why they can't test something easily, write overly complex test cases, until someone points out to them: No, in the scope of unit tests, we don't need to test our persistance layer. We just assume that it works. We should only test our businsess logic. You know: "Assuming that I get that response from the database, I expect that to happen." You don't need a test db, make a real query against that, in order to test that. (That still is a valid thing to do. Yet not in the scope of unit tests.)rant developer unit test test testing fp oop writing tests get your shit together unit testing unit tests8 -
I wrote a prototype for a program to do some basic data cleaning tasks in Go. The idea is to just distribute the files with the executable on our shared network to our team (since it is small enough, no github bullshit needed for this) and they can go from there.
Felt experimental, so I decided to try out F# since I have always been interested with it and for some reason Microsoft adopted it into their core net framework.
I shit you not, from 185 lines of Go code, separated into proper modules etc not to mention the additional packages I downloaded (simple things for CSV reading bla bla)
To fucking 30 lines of F# that could probably be condensed more if I knew how to do PROPER functional programming. The actual code is very much procedural with very basic functional composition, so it could probably be even less, just more "dense"
I am amazed really. I do not like that namespace pollution happens all over F# since importing System.IO gives you a bunch of shit that you wouldn't know where it is coming from unless you fuck enough with Ionide and the docs. But man.....
No need for dotnet run to test this bitch, just highlight it on the IDE, alt enter and WHAM you have the repl in front of you, incremental quasi like Lisp changes on the code can be REPL changed this way, plethora of .NET BCL wonders in it, and a single point of documentation as long as you stay in standard .net
I am amazed and in love, plus finding what I wanted to do was a fucking cakewalk.
Downside: I work in a place in which Python is seen as magic and PHP, VB.NEt and C# is the end all be all of languages. If me goes away or dies there will be no one else in this side of the state to fuck with F#
This language needs to be studied more. Shit can be so compact, but I do feel that one needs to really know enough of functional programming to be good at it. It is really not a pure language like Haskell (then again, haskell is the only "mainstream" pure functional language ain't it not?) but still, shit is really nice and I really dig what Microhard is doing in terms of the .net framework.
Will provide later findings. My entire team is on the Microsoft space, we do have Linux servers, but porting the code to generate the necessary executables for those servers if needed should be a walk in the park. I am just really intrigued by how many lines of code I was able to cut down from the Go application.
Please note that this could also mean that I am a shit Golang dev, but the cut down of nil err checkings do come somewhere.9 -
It works. It finally works!
After an 8 hour session I got my crawler to work and give me basically every anime op/ed I long for.
All that using Elixir even though I'm still fairly inexperienced with both elixir and functional programming
I'll try to create an API and eventually Maybe even a database tomorrow (or rather in a couple of hours)5 -
When I hear, "master/slave" I don't think about terminology and syntax for a programming language I dislike because of its silly functional indent requirements. I think of jumper settings on IDE hard disks in the '90s. Primary master, secondary master, primary slave, secondary slave.2
-
Ok, so I work at this "Great" company. I joined a new team recently with a project that is supposed to be a lot better than many of the other projects we have.
THESE MOTHEERRRRRFUCKERS don't even have hot reload on the app. You have to rebuild the app everytime you make a change. Are you kidding me?! We are using React. One of the basics of React is hot reload. I get into a fucking meeting and one of the devs is like, "I have one important thing to tell you, don't use hooks (a not so new feature in react yet something everyone should use at this point)" and the critical reason we don't use it is because they don't want to confuse the Java devs who are used to their little oop style o_O
Maaaan fuck your developers, it's not my fault you guys can't learn something so simple like functional programming. I haven't even started a sprint yet, I'll burn this app and make you rewrite it all.15 -
This week I reached a major milestone in a Machine Learning/Music Analysis project that I've been working on for a long time!!
I'm really proud to launch 'The Harmonic Algorithm' as an open source project! It represents the evolution of something that's grown with me through two thesis' (initially in music analysis and later in creative computation) and has been a vessel for my passion in both Music and Computation/Machine Learning for a number of years.
For more info, detailed usage examples (with video clips) and installation instructions for anyone inclined to try it out, have a look at the GitHub repo for the project:
https://github.com/OscarSouth/...
"The Harmonic Algorithm, written in Haskell and R, generates musical domain specific data inside user defined constraints then filters it down and deterministically ranks it using a tailored Markov Chain model trained on ingested musical data. This presents a unique tool in the hands of the composer or performer which can be used as a writing aid, analysis device, for instrumental study or even in live performance."1 -
NEW 6 Programming Language 2k16
1. Go
Golang Programming Language from Google
Let's start a list of six best new programming language and with Go or also known by the name of Golang, Go is an open source programming language and developed by three employees of Google and the launch in 2009, very cool just 3 people.
Go originated and developed from the popular programming languages such as C and Java, which offers the advantages of compact notation and aims to keep the code simple and easy to read / understand. Go language designers, Robert Griesemer, Rob Pike and Ken Thompson, revealed that the complexity of C ++ into their main motivation.
This simple programming language that we successfully completed the most tasks simply by librariesstandar luggage. Combining the speed of pemrogramandinamis languages such as Python and to handalan of C / C ++, Go be the best tools for building 'High Volume of distributed systems'.
You need to know also know, as expressed by the CTO Tokopedia namely Mas Leon, Tokopedia will switch to GO-lang as the main foundation of his system. Horrified not?
eh not watch? try deh see in the video below:
[Embedyt] http://youtube.com/watch/...]
2. Swift
Swift Programming Language from Apple
Apple launched a programming language Swift ago at WWDC 2014 as a successor to the Objective-C. Designed to be simple as it is, Swift focus on speed and security.
Furthermore, in December 2015, Swift Apple became open source under the Apache license. Since its launch, Swift won eye and the community is growing well and has become one of the programming languages 'hottest' in the world.
Learning Swift make sure you get a brighter future and provide the ability to develop applications for the iOS ecosystem Apple is so vast.
Also Read: What to do to become a full-stack Developer?
3. Rust
Rust Programming Language from Mozilla
Developed by Mozilla in 2014 and then, and in StackOverflow's 2016 survey to the developer, Rust was selected as the most preferred programming language.
Rust was developed as an alternative to C ++ for Mozilla itself, which is referred to as a programming language that focus on "performance, parallelisation, and memory safety".
Rust was created from scratch and implement a modern programming language design. Its own programming language supported very well by many developers out there and libraries.
4. Julia
Julia Programming Language
Julia programming language designed to help mathematicians and data scientist. Called "a complete high-level and dynamic programming solution for technical computing".
Julia is slowly but surely increasing in terms of users and the average growth doubles every nine months. In the future, she will be seen as one of the "most expensive skill" in the finance industry.
5. Hack
Hack Programming Language from Facebook
Hack is another programming language developed by Facebook in 2014.
Social networking giant Facebook Hack develop and gaungkan as the best of their success. Facebook even migrate the entire system developed with PHP to Hack
Facebook also released an open source version of the programming language as part of HHVM runtime platform.
6. Scala
Scala Programming Language
Scala programming termasukbahasa actually relatively long compared to other languages in our list now. While one view of this programming language is relatively difficult to learn, but from the time you invest to learn Scala will not end up sad and disappointing.
The features are so complex gives you the ability to perform better code structure and oriented performance. Based programming language OOP (Object oriented programming) and functional providing the ability to write code that is capable of evolving. Created with the goal to design a "better Java", Scala became one behasa programming that is so needed in large enterprises.3 -
I'm finally realising my long time dream and making a programming language. It's a functional language resemblent in both appearance and usage to lambda calculus. I'll mostly be making plans down to the finest details until the end of summer, at which point if I can gauge the challenge I can hopefully submit this as a graduate project.
This is the first in a series of articles documenting my progress:
https://lbfalvy.github.io/blog/... -
Me in school: Math? When do I need know those details? I can look them up and just code it.
Me in high school: Computer science is way too math-y. I want to code!
Me coding php: Just make it work.
Me coding typescript: Just make it work.
Me coding scala: Just make it ... what ... how do I make it work!?!
Me asking stackoverflow: How do I do X in scala some functional programming stuff in mind in order to keep immutability.
Somebody way smarter than I: "In scalaz, a function A => A is called an endomorphism and is a Monoid whose associative binary operation is function composition and whose identity is the identity function"
Me now: Fuck my old arrogant self.1 -
.Net is masterrace.
C# gives me frequent orgasms.
Use SQL Server for DB, add to that parallel querying and NoSQL capabilities.
Incredible development speed with EF
Incredebly powerful web framework...check
AI and neural networks...check
App Development...Xeck
If you want to do some of that functional programming F# is the language for you.
And the best thing: .Net core runs on Linux too10 -
I AM TIRED
warning: this rant is going to be full of negativity , CAPS, and cursing.
People always think and they always write that programming is an analytical profession. IF YOU CANNOT THINK IN AN ANALYTICAL WAY THIS JOB IS NOT FOR YOU! But the reality could not be farther from the truth.
A LOT of people in this field whether they're technical people or otherwise, just lack any kind of reasoning or "ANALYTICAL" thinking skills. If anything, a lot of of them are delusional and/or they just care about looking COOL. "Because programming is like getting paid to solve puzzles" *insert stupid retarded laugh here*.
A lot of devs out there just read a book or two and read a Medium article by another wannabe, now think they're hot shit. They know what they're doing. They're the gods of "clean" and "modular" design and all companies should be in AWE of their skills paralleled only by those of deities!
Everyone out there and their Neanderthal ancestor from start-up founders to developers think they're the next Google/Amazon/Facebook/*insert fancy shitty tech company*.
Founder? THEY WANT TO MOVE FAST AND GET TO MARKET FAST WITH STUPID DEADLINES! even if it's not necessary. Why? BECAUSE YOU INFERIOR DEVELOPER HAVE NOT READ THE STUPID HOT PILE OF GARBAGE I READ ONLINE BY THE POEPLE I BLINDLY COPY! "IF YOU'RE NOT EMBARRASSED BY THE FIRST VERSION OF YOU APP, YOU DID SOMETHING WRONG" - someone at Amazon.
Well you delusional brainless piece of stupidity, YOU ARE NOT AMAZON. THE FIRST VERSION THAT THIS AMAZON FOUNDER IS EMBARRASSED ABOUT IS WHAT YOU JERK OFF TO AT NIGHT! IT IS WHAT YOU DREAM ABOUT HAVING!
And oh let's not forget the tech stacks that make absolutely no fucking sense and are just a pile of glue and abstraction levels on top of abstraction levels that are being used everywhere. Why? BECAUSE GOOGLE DOES IT THAT WAY DUH!! And when Google (or any other fancy shit company) changes it, the old shitty tech stack that by some miracle you got to work and everyone is writing in, is now all of a sudden OBSOLETE! IT IS OLD. NO ONE IS WRITING SHIT IN THAT ANYMORE!
And oh my god do I get a PTSD every time I hear a stupid fucker saying shit like "clean architecture" "clean shit" "best practice". Because I have yet to see someone whose sentences HAVE TO HAVE one of these words in them, that actually writes anything decent. They say this shit because of some garbage article they read online and in reality when you look at their code it is hot heap of horseshit after eating something rancid. NOTHING IS CLEAN ABOUT IT. NOTHING IS DONE RIGHT. AND OH GOD IF THAT PERSON WAS YOUR TECH MANAGER AND YOU HAVE TO LISTEN TO THEM RUNNING THEIR SHITHOLE ABOUT HOW YOUR SIMPLE CODE IS "NOT CLEAN". And when you think that there might be a valid reason to why they're doing things that way, you get an answer of someone in an interview who's been asked about something they don't know, but they're trying to BS their way to sounding smart and knowledgable. 0 logic 0 reason 0 brain.
Let me give you a couple of examples from my unfortunate encounters in the land of the delusional.
I was working at this start up which is fairly successful and there was this guy responsible for developing the front-end of their website using ReactJS and they're using Redux (WHOSE SOLE PURPOSE IS TO ELIMINATE PASSING ATTRIBUTES FOR THE PURPOSE OF PASSING THEM DOWN THE COMPONENT HIERARCHY AGIAN). This guy kept ranting about their quality and their shit every single time we had a conversation about the code while I was getting to know everything. Also keep in mind he was the one who decided to use Redux. Low and behold there was this component which has THIRTY MOTHERFUCKING SEVEN PROPERTIES WHOSE SOLE PURPOSE IS BE PASSED DOWN AGAIN LIKE 3 TO 4 TIMES!.
This stupid shit kept telling me to write code in a "functional" style. AND ALL HE KNOWS ABOUT FUNCTIONAL PROGRAMMING IS USING MAP, FILTER, REDUCE! And says shit like "WE DONT NEED UNIT TESTS BECAUSE FUNCTIONAL PROGRAMMING HAS NO ERRORS!" Later on I found that he read a book about functional programming in JS and now he fucking thinks he knows what functional programming is! Oh I forgot to mention that the body of his "maps" is like 70 fucking lines of code!
Another fin-tech company I worked at had a quote from Machiavelli's The Prince on EACH FUCKING DESK:
"There is nothing more difficult to take in hand, more perilous to conduct, or more uncertain in its success, than to take the lead in the introduction of a new order of things."
MOTHERFUCKER! NEW ORDER OF THINGS? THERE 10 OTHER COMPANIES DOING THE SAME SHIT ALREADY!
And the one that got on my nerves as a space lover. Is a quote from Kennedy's speech about going to the moon in the 60s "We choose to go to the moon and do the hard things ..."
YOU FUCKING DELUSIONAL CUNT! YOU THINK BUILDING YOUR SHITTY COPY PASTED START UP IS COMPARABLE TO GOING TO THE MOON IN THE 60S?
I am just tired of all those fuckers.13 -
So today I saw another 'OOP should die' article.
And I decided I should google around a bit to find out why.
Reasons I found:
- Things get too complicated
- Things get too abstract (same as the above really)
But when I search for alternatives, only functional programming and different ways to use OOP get mentioned.
I still don't get why OOP is supposedly bad though.
Maybe my 20-30k LOC projects aren't big enough to see it?
For me the abstraction works very well. The abstraction is used to keep the complexity low(er).
And the different ways of using OOP are a plus-point for me. (Like the Entity-Component system)
I don't know enough about functional programming to be able to say it's better or worse, but the ideas behind it a perfectly usable in languages like C#.
So if any of you have a good concrete reason to not use OOP, please feel welcome to tell me in the comments :)12 -
So, this is probably somewhat esoteric but...
While studying at university I had a "programming paradigms" module, dunno why they called it that, it was more like "introduction to functional programming".
So, it's kinda mind bending, we'd only really started to get our heads around classical object oriented programming and they throw functional programming at us.
It's worse than that though, for do they use an established language, like lisp/scheme, functional Python, or even given Haskell?
No, of course they didn't. They taught us Oz.
You probably won't have heard of it, but this language is burned into the back of my brain, along with a vague understanding of the n-queens problem we had to solve graphically (using qTk, which I dunno if someone took qt and tk and blended them, I stopped asking questions after a while).
To top it off did this language (at the time) have a stand alone interpreter? Did it buggery! It was coupled to the Mozart programming system, which is just Emacs (which has a bloody lisp built into it,so close, yet so far 😭).
It gets worse, though, oh does it get worse, for pause dear reader and consider, have you ever heard of Mozart/oz before, I'd put money on most of you had not heard of it until today.
For, you see, I believe at the time of writing, one, yes, ONE text book exists on this language. When I was doing my assignment there was merely some published conference notes and language design documents.
That's not all, I was not the only one experiencing difficulties with this language, someone in the class ended up pouring through the mailing lists and found the very tutor teaching the class struggling at first to understand the language.
I had to repeat that year. The functional programming class was one semester.
When I retook that year, it was a whole year long. However, halfway through the year, original tutor was fired and a new tutor was hired to teach the language.
He was, understandably, just as confused as we were.
There was a Starbucks and a pub equidistant from the lecture hall, though in opposite directions. From lecture to lecture we had no idea which one we'd end up in.
I have reason to believe Mozart/Oz it some sort of otherworldly abomination designed to give students the occasional nightmare flashback, long after they've left.
My room had post it notes, sheets of paper, print outs, diagrams, doodles and pens, just stuck to the wall, I looked like a raving lunatic three hours away from being institutionalised. There was string connecting one diagram to the next and images of a chess queen all over. As I attempted to solve the n-queens problem.
Madmans knowledge, I call it. I can never unlearn all that, in fact it seeps into much of the code I write. Such information was not meant for the minds of a simple country bumpkin such as myself...
Mozart/Oz... I wouldn't be the programmer I am today without it, and that's frankly terrifying...10 -
In a getting started tutorial about Haskell:
"You probably already have haskell installed because you tried to learn it once and failed"
He's so right...1 -
I FINALLY comprehend list comprehensions.
I can write an unlimited amount of nested loops on a single line and make other less experienced people hate me for fun and profit.
Also learned about map() #I hate it#, zip(which is awesome), and the utility of lambdas (they're okay).
Enumerate is pretty nifty too, only thing I lose is setting the initial value of the iterator index.15 -
This takes me back 14 years to the past when I first started learning VB.Net and Console Apps.
Learning F# to get my self into functional programming let's hope I don't get carried away with the ability to mix C# with F# :\ -
-I'm gonna learn C for real
-I'm gonna configure Vim
-I'm gonna try November
-Emacs with Evil mode is a better Vim
-I'm gonna learn eLisp
-I'm gonna learn functional programming
-Gonna use clojure for everything now!
-init.el is 400 lines long
int main() {printf("Hello World!");}
Success! 🤦♂️1 -
So... I joined the Blacker black side and shit's awesome!
Anyways, just wanted to take a break from my Functional Programming study for my exam I have on Tuesday. My brain's a mess rn.8 -
Functional programming vs object oriented programming.
I don't believe one can replace the other I just want to know some other people's opinions.40 -
I could write 20 pages ranting but it can be summarized in a few words that describe the situation pretty well:
My 'CTO' doesn't understand basic OO principles (say, inheritance) nor functional programming.3 -
I’ve come to the conclusion that developers who like react have never used it for anything even remotely complicated.
Because here’s reacts dirty little secret; it doesn’t scale. Not even a little. It’s flexible, but that leads to every developer writing their code in a different way.
It’s simple and easy for simple side projects, but as soon as you have to pass state to a child component, you’re fucked. And god help you if you’re modifying the state in said child component. You can try using redux, but that’s a bandaid solution to the real issue.
There are better alternatives, namely Vue. There’s no need to write unintelligible code that’s a mutated hybrid of html css and js. We as web developers realized mixing these technologies was a bad idea a long time ago.
React simply doesn’t scale. It’s flexibility, complexity, and the awful code quality it leads to makes it a nightmare for large projects with multiple developers
Some of its concepts are interesting and useful though. It’s functional concepts allow for easy code reuse, among the other benefits associated with functional programming
I sincerely hope that the hype around react dies out, and a new framework emerges that takes the best from react and fixes the glaring issues it currently has23 -
The worst architecture I've seen is WordPress.
How can you be so drunk to design such a filthy mess?
In some way PHP might be to blame. Its API is a fucking mess as well and may have stirred WP developers in this puke around so they couldn't come up with a better CMS architecture.
Don't get me wrong. I do love PHP. But only in it's OO form with namespaces and type hints and composer dependencies.
I've seen enough of PHP functional programming and it still haunts me.8 -
You look like someone who unironically puts “JSON” on their resume as one of programming languages they know.
You probably have casual pictures of Dan Abramov saved on your phone.
Now go finish your top 10 coding productivity lifehacks insta tiktok, or go adjust your standing desk one more time, or go type on your custom mechanical keyboard (which probably has different switches for functional keys. Should I call the keys “functional” if a person like this is the only person who presses them though?)
Yeah, you’re a rockstar. Yeah, that next medium article you’ll write is gonna make you famous. Yeah.13 -
My freelance horror story just happened a few weeks ago. Programming final project was due and a classmate payed me to make his project. It was something very simple so I was able to make mine and his different and functional. Grades went up yesterday; he got an A and I got a B+ 🙃 #wk861
-
I prefer functional style programming because it is easier to me to think in modules and functional hierarchies than it is object style shierarchies.
All in all, languages like F# and Clojure have always been fascinating to me. I wish I could find a use case for Haskell, but I can't. If anything F# is awesome to me because I already know .NET and really dig the entire framework, the strides made by Core are outstanding.
I had tried Scala before and just couldn't get into it. Far easier to just stick to Java even if I hate the idea of extending classes all over the place.
Ocaml is interesting too, but I know little to nothing about it, and Elixir looks far too much like Ruby for my taste even if I do like Ruby.
Choice is good, but sometimes overwhelming14 -
I’m done with people that derail meetings and discussions.
While I want to seek feedback for an Interface that I wrote, these attention seekers decide it’ll be the perfect opportunity to bring up the topic of “how functional programming paradigm facilitates better encapsulation”.
Everyone else follow suit. I try “time checking” and bringing the talk back on track. Never worked.
I’m concluding that meetings are shit and a COLOSSAL WASTE OF TIME.6 -
uSE AnY pRogrAmMinG L@ngu@g3 yOu liKe.
1nTervi3weRs Do N0t CarE aBouT tHe L@nGuAge.
Fuck you. Stop asking time complexity or space complexity of functional code. No one fucking knows.19 -
When I was in college OOP was emerging. A lot of the professors were against teaching it as the core. Some younger professors were adamant about it, and also Java fanatics. So after the bell rang, they'd sometimes teach people that wanted to learn it. I stayed after and the professor said that object oriented programming treated things like reality.
My first thought to this was hold up, modeling reality is hard and complicated, why would you want to add that to your programming that's utter madness.
Then he started with a ball example and how some balls in reality are blue, and they can have a bounce action we can express with a method.
My first thought was that this seems a very niche example. It has very little to do with any problems I have yet solved and I felt thinking about it this way would complicate my programs rather than make them simpler.
I looked around the at remnants of my classmates and saw several sitting forward, their eyes lit up and I felt like I was in a cult meeting where the head is trying to make everyone enamored of their personality. Except he wasn't selling himself, he was selling an idea.
I patiently waited it out, wanting there to be something of value in the after the bell lesson. Something I could use to better my own programming ability. It never came.
This same professor would tell us all to read and buy gang of four it would change our lives. It was an expensive hard cover book with a ribbon attached for a bookmark. It was made to look important. I didn't have much money in college but I gave it a shot I bought the book. I remember wrinkling my nose often, reading at it. Feeling like I was still being sold something. But where was the proof. It was all an argument from authority and I didn't think the argument was very good.
I left college thinking the whole thing was silly and would surely go away with time. And then it grew, and grew. It started to be impossible to avoid it. So I'd just use it when I had to and that became more and more often.
I began to doubt myself. Perhaps I was wrong, surely all these people using and loving this paradigm could not be wrong. I took on a 3 year project to dive deep into OOP later in my career. I was already intimately aware of OOP having to have done so much of it. But I caught up on all the latest ideas and practiced them for a the first year. I thought if OOP is so good I should be able to be more productive in years 2 and 3.
It was the most miserable I had ever been as a programmer. Everything took forever to do. There was boilerplate code everywhere. You didn't so much solve problems as stuff abstract ideas that had nothing to do with the problem everywhere and THEN code the actual part of the code that does a task. Even though I was working with an interpreted language they had added a need to compile, for dependency injection. What's next taking the benefit of dynamic typing and forcing typing into it? Oh I see they managed to do that too. At this point why not just use C or C++. It's going to do everything you wanted if you add compiling and typing and do it way faster at run time.
I talked to the client extensively about everything. We both agreed the project was untenable. We moved everything over another 3 years. His business is doing better than ever before now by several metrics. And I can be productive again. My self doubt was over. OOP is a complicated mess that drags down the software industry, little better than snake oil and full of empty promises. Unfortunately it is all some people know.
Now there is a functional movement, a data oriented movement, and things are looking a little brighter. However, no one seems to care for procedural. Functional and procedural are not that different. Functional just tries to put more constraints on the developer. Data oriented is also a lot more sensible, and again pretty close to procedural a lot of the time. It's just odd to me this need to separate from procedural at all. Procedural was very honest. If you're a bad programmer you make bad code. If you're a good programmer you make good code. It seems a lot of this was meant to enforce bad programmers to make good code. I'll tell you what I think though. I think that has never worked. It's just hidden it away in some abstraction and made identifying it harder. Much like the code methodologies themselves do to the code.
Now I'm left with a choice, keep my own business going to work on what I love, shift gears and do what I hate for more money, or pivot careers entirely. I decided after all this to go into data science because what you all are doing to the software industry sickens me. And that's my story. It's one that makes a lot of people defensive or even passive aggressive, to those people I say, try more things. At least then you can be less defensive about your opinion.53 -
Should I try to learn functional programming or focus on a lower level language?
My strongest language is C#.
I'm looking at F# or Rust atm.
Thoughts?19 -
Every single stakeholder in my company tells me that I should be working on something different, every time I talk to them. For example - we've got some issues, that I've ranted on previously. I go to my manager, and tell him that it's going to take longer than I'd hoped, because the author of this part of the codebase wasn't familiar with functional programming or OOP, didn't document anything, and just generally produced an unmaintainable, borderline indescribable mess. The next guy after him made it all so much worse, because they're both a couple of tryhard douchebags, and I hope they fucking die. For real. I hope fire ants are involved.
Anyway, getting carried away there, whew. So I tell my manager that we'd be further ahead just replacing the code, because it's only doing a couple of things, and should not be so complex. He says "cool, but what you really need to be doing is rebuilding this other thing." So I switch gears and work on that other thing until I hit a point that requires the input of another stakeholder. I go to talk to this guy, and all hell breaks loose "why are you working on that, this is higher priority", and I explain the sequence of events. Manager denies having said what he said, I look like an asshole, yet again. Then the old "this should be simple, just change this" from the dudes who don't know code, and don't want to know. I try to explain, offer to show them precisely why their "simple ask" is anything but, but they just start screaming about how they hate technology. Yeah, well me fucking too. I keep hearing about how much "job security" I have, but man I'm going to lose my mind at this rate. I have seventeen motherfucking things that are "emergencies", and as many fucking dumb ass unintuitive workflows to go through to get them changed. All on production, because this place is fucking stupid. Just let me discard this shitty legacy code and be done with it already. FUCK.
Thank fucking fuck it's friday. In about six, seven hours, my goal is to be so fucking wasted that I can't feel my face. Get drunk, play with the dog, install a new distro on the desktop, maybe play a little guitar (the guitar is normal sized. It's not a ukulele or anything). Perfect friday night.9 -
Why does every Software Engineering role at the top companies never have PHP or any functional languages in it’s list of languages they want you to be experienced in?
It’s always Java, Python, C#, C/C++, Objective C or Ruby. What about Elixir, Scala, Haskell or Clojure?9 -
>Get java "From zero to hero" book at the age of 12
>Follow along and despair at all the java jargon
>write small programs for fun
>ff to 14yo
>Get my first android phone (galaxy S3)
>Get android 4.0 book
>Follow along and despair at all the android jargon
>Develop small apps for fun
>Learn Java, C and python for the rest of high school
>discover functional programming (erlang/elixir) towards the end of highschool
>love_at_first_sight.jpg
>Learn said language
>Find first job and current job right after that
>happy3 -
!rant
Need some opinions. Joined a new company recently (yippee!!!). Just getting to grips with everything at the minute. I'm working on mobile and I will be setting up a new team to take over a project from a remote team. Looking at their iOS and Android code and they are using RxSwift and RxJava in them.
Don't know a whole lot about the Android space yet, but on iOS I did look into Reactive Cocoa at one point, and really didn't like it. Does anyone here use Rx, or have an opinion about them, good or bad? I can learn them myself, i'm not looking for help with that, i'm more interested in opinions on the tools themselves.
My initial view (with a lack of experience in the area):
- I'm not a huge fan of frameworks like this that attempt to change the entire flow or structure of a language / platform. I like using third party libraries, but to me, its excessive to include something like this rather than just learning the in's / out's of the platform. I think the reactive approach has its use cases and i'm not knocking the it all together. I just feel like this is a little bit of forcing a square peg into a round hole. Swift wasn't designed to work like that and a big layer will need to be added in, in order to change it. I would want to see tremendous gains in order to justify it, and frankly I don't see it compared to other approaches.
- I do like the MVVM approach included with it, but i've easily managed to do similar with a handful of protocols that didn't require a new architecture and approach.
- Not sure if this is an RxSwift thing, or just how its implemented here. But all ViewControllers need to be created by using a coordinator first. This really bugs me because it means changing everything again. When I first opened this app, login was being skipped, trying to add it back in by selecting the default storyboard gave me "unwrapping a nil optional" errors, which took a little while to figure out what was going on. This, to me, again is changing too much in the platform that even the basic launching of a screen now needs to be changed. It will be confusing while trying to build a new team who may or may not know the tech.
- I'm concerned about hiring new staff and having to make sure that they know this, can learn it or are even happy to do so.
- I'm concerned about having a decrease in the community size to debug issues. Had horrible experiences with this in the past with hybrid tech.
- I'm concerned with bugs being introduced or patterns being changed in the tool itself. Because it changes and touches everything, it will be a nightmare to rip it out or use something else and we'll be stuck with the issue. This seems to have happened with ReactiveCocoa where they made a change to their approach that seems to have caused a divide in the community, with people splitting off into other tech.
- In this app we have base Swift, with RxSwift and RxCocoa on top, with AlamoFire on top of that, with Moya on that and RxMoya on top again. This to me is too much when only looking at basic screens and networking. I would be concerned that moving to something more complex that we might end up with a tonne of dependencies.
- There seems to be issues with the server (nothing to do with RxSwift) but the errors seem to be getting caught by RxSwift and turned into very vague and difficult to debug console logs. "RxSwift.RxError error 4" is not great. Now again this could be a "way its being used" issue as oppose to an issue with RxSwift itself. But again were back to a big middle layer sitting between me and what I want to access. I've already had issues with login seeming to have 2 states, success or wrong password, meaning its not telling the user whats actually wrong. Now i'm not sure if this is bad dev or bad tools, but I get a sense RxSwift is contributing to it in some fashion, at least in this specific use of it.
I'll leave it there for now, any opinions or advice would be appreciated.question functional programming reactivex java library reactive ios functional swift android rxswift rxjava18 -
I want the pipeline-operator in JavaScript. I want it now!
... But then I mostly work with Vue.js (because it's awesome) in the last time and I somehow miss vanilla JavaScript. Life is cruel.4 -
Any Haskell programmers here?
I started to learn this language for fun two days ago and so far I find it absolutely amazing and really different to OOP languages. Most of the time the solutions make so much sense, but actually coding them requires really abstract thinking of the problem. How fast did you learn Haskell? How long it took you do code it comfortably? Any advises you can give me? I work mainly through a uni exercise sheet from a friend from a different uni, and the rest is hoogle and google :P10 -
CSS, I fucking hate you.
I fucking hate my job, because of you. I'm pulling my hair out every day, all day because I have to put up with your bullshit. If it weren't for you, I'd probably enjoy design.
You're not even programming. You're the mistake that happened when web-design developed too rapidly for the devs at the time to keep up and produce intuitive, functional tools. That, or they were just fucking sadists.
You're a band-aid that's started to rot, but we just keep sticking pretty stickers over you and pretending like the wound isn't festering.
I wish I could spend more time learning C and C++. Then I could go get a real job as far away from you as is virtually possible.
. . .
Look, just this once - just for today - could you please do what I fucking ask you to. I mean, I'm just asking you to do your fucking job. That's all.22 -
A year ago I ranted, that I understood JavaScript callbacks.
That was a lie. I knew nothing.
But I think I scratched the surface by getting into functional programming this time.3 -
CAN SOMEONE PLEASE EXPLAIN TO ME WHAT THE FUCK LAMBDA CALCULUS IS??!?!?!
I swear to fuck, nothing makes you feel more like an idiot than trying to understand functional programming after living all your life in the oop world.
Fucking meta-functions and alligator games.
Fuck this, I'm going back to my happy little Java world11 -
It is still blowing my mind how a button on my raspberry pi is programmatically functional in the same way as if I was programming a database and web app.
Fucking eh, why haven't I been doing this hardware stuff sooner? You can literally make physical shit happen. That is so cool!4 -
Why is it that virtually all new languages in the last 25 years or so have a C-like syntax?
- Java wanted to sort-of knock off C++.
- C# wanted to be Java but on Microsoft's proprietary stack instead of SUN's (now Oracle's).
- Several other languages such as Vala, Scala, Swift, etc. do only careful evolution, seemingly so as to not alienate the devs used to previous C-like languages.
- Not to speak of everyone's favourite enemy, JavaScript…
- Then there is ReasonML which is basically an alternate, more C-like, syntax for OCaml, and is then compiled to JavaScript.
Now we're slowly arriving at the meat of this rant: back when I started university, the first semester programming lecture used Scheme, and provided a fine introduction to (functional) programming. Scheme, like other variants of Lisp, is a fine language, very flexible, code is data, data is code, but you get somewhat lost in a sea of parentheses, probably worse than the C-like languages' salad of curly braces. But it was a refreshing change from the likes of C, C++, and Java in terms of approach.
But the real enlightenment came when I read through Okasaki's paper on purely functional data structures. The author uses Standard ML in the paper, and after the initial shock (because it's different than most everything else I had seen), and getting used to the notation, I loved the crisp clarity it brings with almost no ceremony at all!
After looking around a bit, I found that nobody seems to use SML anymore, but there are viable alternatives, depending on your taste:
- Pragmatic programmers can use OCaml, which has immutability by default, and tries to guide the programmer to a functional programming mindset, but can accommodate imperative constructs easily when necessary.
- F# was born as OCaml on .NET but has now evolved into its own great thing with many upsides and very few downsides; I recommend every C# developer should give it a try.
- Somewhat more extreme is Haskell, with its ideology of pure functions and lazy evaluation that makes introducing side effects, I/O, and other imperative constructs rather a pain in the arse, and not quite my piece of cake, but learning it can still help you be a better programmer in whatever language you use on a day-to-day basis.
Anyway, the point is that after working with several of these languages developed out of the original Meta Language, it baffles me how anyone can be happy being a curly-braces-language developer without craving something more succinct and to-the-point. Especially when it comes to JavaScript: all the above mentioned ML-like languages can be compiled to JavaScript, so developing directly in JavaScript should hardly be a necessity.
Obviously these curly-braces languages will still be needed for a long time coming, legacy systems and all—just look at COBOL—, but my point stands.7 -
One day after typescript , I ditch JavaScript on es5 totally and my college education on objective orient finally pays off ! !
I love functional programming but still insist that objective oriented is better for large project3 -
After I cured my depression with Vortioxetine which was prescribed to me because of pure luck, I can notice that something has changed.
I can't tell if I like or don't like something anymore. It doesn't matter now which food to eat, what music to listen to, I just can't see the difference. I dropped all my side projects, quit my job and got another, much easier one. I don't see the big picture of things anymore. I also lost my ability to reverse-engineer problematic outcomes and find solutions.
I used to be an architect but now I can't design anything, I just forgot how to do what I could do without thinking. I forgot Lisp and Clojure, functional programming is too hard for me now. I just don't understand it.
My iq also significantly dropped.
Summarizing all that, and also remembering that liking or not liking something implies that you have a personality, I can only see one reason – I probably don't have a personality anymore.
Here's a summary of my experiences from when I was depressed:
depression makes you dumb
you struggle with simplest tasks
you only eat and go to the bathroom because sometimes your basic instincts win
depression takes your power of will – the most valuable thing you have
society doesn't understand and shames you
you can't think
you can't focus
you can't study
you need money but you can't make it
you don't have that save space inside your thoughts anymore
you don't have dreams
your sleep schedule is fucked
every night there's a nightmare and you can't wake up
you can't cry
they prescribe you one neuroleptic after another and they only makes it worse, turning you into a vegetable
you feel nothing but shame and irrational infinite guilt10 -
What I'm doing now, writing a JS library for a simple kitchen timer (like, something that can be wound up, is ticking, can be paused, etc). Here's a list of neat stuff I've learned:
Polyfilling as a lib author (I decided against it).
Packaging the lib (using Rollup, ES6 modules are totes cool).
Using flow to add static typing in strategic places (started appreciating types in JS since reading up on functional programming).
Modelling state and transitions using an explicit state machine. (Fucking finally. There's usually an implicit state machine somewhere, only spread out all over the app...)
Using mostly side-effect free methods, being very explicit about when and why things are mutated).
Test-first/TDD (ish) using Jest and the awesome Wallabyjs.
Freeing up mental capacity by letting Prettier format my code for me (it was hard to let go but totally worth it).
Started using git.
Did all work on Ubuntu after pretty much a lifetime of Windows (initially to separate work from gaming) and finally swapped MS Visual Studio for Atom.
When it's finished I'm going to publish it on GitHub, which will also be a first for me. Might try out some CI platform while I'm at it.
tl;dr: wrote some js, felt good2 -
I know functional programming is hip now, but I wonder if I'll ever see a day when it's considered cutting edge to make every variable global. Possible twilight zone episode?6
-
My dev lead is a uniquely poor leader with an impressive ability to produce a large amount inflexible, temporarily functional code.
As we're in another pair programming session where I try to keep him from destroying over all type safety and architectural decisions to meet a self imposed demo deadline, he keeps trying to access properties of his state.
This state object is incorrectly typed with an anonymous type with incorrect properties.
Despite repeating calmly stating that the object is incorrectly typed, and that's why there are red underlines when he tries to access a property he knows is in there, he insists that that's not correct.
Finally, he knowingly says that he's figured it out and that he's been doing this for many years.
What was the solution you might ask? (state as any).myProperty;
Truly breathtaking mastery. -
I continue to internally read and study about Smalltalk in an effort to see where we might have FUCKED UP and went backwards in terms of software engineering since I do not believe that complex source code based languages are the solution.
So I have Pharo. Nothin to complex really, everything is an object, yet, you do have room for building DSL's inside of it over a simple object model with no issue, the system browser can be opened across multiple screens (morph windows inside of a smalltalk system) for which you can edit you code in composable blocks with no issues. Blocks being a particular part of the language (think Ruby in more modern features) give ample room for functional programming. Thus far we have FP and OO (the original mind you) styles out in the open for development.
Your main code can be executed and instantly ALTER the live environment of a program as it is running, if what you are trying to do is stupid it won't affect the live instance, live programming is ahead of its time, and impressive, considering how old Smalltalk is. GUI applications can be given headless (this is also old in terms of how this shit was first distributed) So I can go ahead and package the virtual machine with the entire application into a folder, and distribute it agains't an organization "but why!!!! that package is 80+ mbs!") yeah cuz it carries the entire virtual machine, but go ahead and give it to the Mac user, or the Linux user, it will run, natively once it is clicked.
Server side applications run in similar fashion to php, in terms of lifecycles of request and how session storage is handled, this to me is interesting, no additional runtimes, drop it on a server, configure it properly and off you go, but this is common on other languages so really not that much of a point.
BUT if over a network a user is using your application and you change it and send that change over the network then the the change is damn near instant and fault tolerant due to the nature of the language.
Honestly, I don't know what went wrong or why we are not bringing this shit to the masses, the language was built for fucking kids, it was the first "y'all too stupid to get it, so here is simple" engine and we still said "nah fuck it, unlimited file system based programs, horrible build engines and {}; all over the place"
I am now writing a large budget managing application in Pharo Smalltalk which I want to go ahead and put to test soon at my institution. I do not have any issues thus far, other than my documentation help is literally "read the source code of the package system" which is easy as shit since it is already included inside. My scripts are small, my class hierarchies cover on themselves AND testing is part of the system. I honestly see no faults other than "well....fuck you I like opening vim and editing 300000000 files"
And honestly that is fine, my questions are: why is a paradigm that fits procedural, functional and OBVIOUSLY OO while including an all encompassing IDE NOT more famous, SELECTION is fine and other languages are a better fit, but why is such environment not more famous?9 -
How the Common Lisp Community will eventually die soon:
Clojure is the only main Lisp dialect having some sort of heavy presence in today's modern development world. Yes, I am aware of other(if not all) environments in which Lisp or a dialect of it is being used for multiple things, CADLisp, Guile Scheme, Racket, etc etc whatever. I know.
Not only is Clojure present in the JVM(I give 0 fucks about whether you like it or not also) but also has compilation targets for Javascript via Clojurescript. This means that i can effectively target backend server operations, damn near everything inside of the JVM and also the browser.
Yet, there is no real point in using Lisp or Clojure other than for pure academic endeavours, for which it is not even a pure functional programming language, you would be better served learning something else if you want true functional purity. But also because examples for one of the major areas in software development, mainly web, are really lacking, like, lacking bad, as in, so bad most examples are few in between and there is no interest in making it target complete beginners or anything of the like.
But my biggest fucking gripe with Lisp as a whole, specifically Common Lisp, is how monstrously outdated the documentation you can find available for it is.
Say for example, aesthetics, these play a large role, a developer(web mostly) used to the attention to detail placed by the Rails community, the Laravel community, django, etc etc would find on documentation that came straight from the 90s. There is no passion for design, no attention to detail, it makes it look hacky and abandoned. Everything in Lisp looks so severely abandoned for which the most abundant pool of resources are not even made present on a fully general purpose language constrained as a scripting environment for a text editor: Emacs with Emacs Lisp which I reckon is about the most used Lisp dialect in the planet, even more so than Clojure or Common Lisp.
I just want the language to be made popular again y'know? To have a killer app or framework for it much like there is Rails for Ruby, Phoenix for Elixir, etc etc. But unless I get some serious hacking done to bring about the level of maturity of those frameworks(which I won't nor I believe I can) then it will always remain a niche language with funny syntax.
To be honest I am phasing away my use of Clojure in place of Pharo. I just hate seeing how much the Lisp community does in an effort to keep shit as obscure and far away from the reach of new developers as possible. I also DESPISE reading other Lisp developer's code. Far too fucking dense and clever for anyone other than the original developer to read and add to. The idea that Lisp allows for read only code is far too real man.
Lisp has been DED for a while, and the zombies that remain will soon disappear because the community was too busy playing circle jerks for anything real to be done with it. Even as the original language of AI it has been severely outshined by the likes of Python, R and Scala, shit, even Javascript has more presence in AI than Lisp does now a days.9 -
I would like to get a little bit into functional programming.
Do you have any language suggestions to learn?14 -
!rant
so the other day i was programming and suddenly i wanted to learn haskell. (i don't know why it hit me so suddenly, maybe because it's a 'pure' functional programming language and these 2 terms i knew nothing about)
and to be honest it's really hard coming from an imperative programming language (C/C++, yes, i know they are different in their ways). it's like learning to program again! you really have to get a different mindset and for me honestly it's hard to grasp the idea that 'variables' are immutable! like, that's soooo weird it still stucks to me. for example how did they define the max or min function without using a while loop? what are monads?
I am just 2 days in but it'll be a fun ride!6 -
Today’s frontend bitches appropriating functional programming like “ancient programming secrets” is exactly like eighties con artist bitches appropriating yoga and ayurveda like “ancient well-being secrets”
Just plain wrong and laughable
Go learn cs11 -
Why is OOP hated, here?
How is functional programming much better than OOP? (as stated by so many peole here)18 -
Oh wow Elixir, you are so fancy and beautiful. Where have you been hiding! Can i take you out some time? Maybe a small project? 🤓5
-
That moment when you're very happy you just completed a hard Haskell kata in CodeWars, with 8 lines, three functions, a lot of functional concepts (which would take at least 30 lines in Java or C#) and they show you the top voted solution by another user with JUST TWO LINES and a lot of function composition.2
-
I am wondering how a #FunctionalProgramming based implementation of a Binary Search Tree would look like?
Has anyone tried it?11 -
I mean JavaScript is all cool and everything, but without type safety, it becomes gigantic pain in my ass :'(
Is there anybody who feels the same? :(9 -
So guys, do you think I should learn one functional programming language and if so should it be haskell?2
-
I read the pragmatic programmer a few months ago. The book advised learning a different programming language every month or so. I was doing Advent of Code so I decided to try out Elm because functional programming is all the rage these days.
It took me one hour to convert a string of numbers to an array of numbers! And when I finally finished with that I couldn't understand how to compare each element with the next one in an array using map or filter.
I realised that I've become too comfortable using javascript. Worst case scenario: In a few years when javascript is obsolete I'll be like those old dudes that know only Cobol. Best case scenario: I'll always be too dumb to earn a nice salary.
On a positive note: The first time I tried Elm I didn't understand jack shit, now I understood a few things.5 -
Trying out pure functional programming in javascript. First few weeks: wow, this is so fresh, oop can die, etc. Now: this isn't readable at all! 😐5
-
My first rant. Woohoo!
Honestly I do the whole shebang ussualy depending on what the needs are from network to servers to coding because for some reason nobody has any technical experience where I work.
I just started app development for a gamedev startup and I am in sheer awe of the amount of transpiling/compiling etc that needs to be done for an multiplatform app for iOS and android with js(x)/typescript, html, css.
I remember when I could just write some spaghetti code to make it working by following a couple of tutorials. Then refractoring and testing it for a couple of hours and be done with it. push it into production.
Now I am lost having to learn OOP, functional programming, reactjs, react native, express, webpack, mongodb, babel, and the list goes on and on...
Why not just make a new backend that does all of that in another language which supports all of that.
I have no formal education in programming/coding and the last time I learned JS it was just some if else, switches and simple dom manipulation.
I just want to get to coding a freakin' game but I have to learn JSX for the front and typescript on the backend.
I am this close to going back to ye ol' lamp stack and quitting this job. 😥5 -
New folks, learn functional programming. Avoid the stupid pain with OOP and mutability. Pays off a lot and for ffs, increase your salary demand, don't lowball, so everyone can enjoy higher pay.43
-
Learn JavaScript.!!
Everybody talk about functional programming, I was thinking why php json_encode is not working on large array.
Javascript is Awesome.2 -
I'm still pretty new to elixir and functional programming. There have been numerous cases where I accidentally recreated functions such as Enumerable.map 😅2
-
Anyone in here successfully using a pure FP language/ecosystem on their day to day?
I know of one of you that uses Scala, and myself I have an (admittedly) shitty application at work running in Clojure. These last two languages I mentioned are not pure FP.
I am talking about the likes of PureScript, Haskell, etc. Those mfkas.
If so,what is your experience working in said paradigm? I tried to keep my Clojure program as pure as possible, I failed, but enjoyed it.
And I know that FP is not a silver bullet, but in some scenarios when properly applied it can work beautifully. I also have React based applications with pure components, but Javascript itself is neither a functional(pure or otherwise) programming language, it merely supports functional paradigms.
Just wondering, no flamewars or anything like that, I just want to know your pros and cons.6 -
My Gripe With Implicit Returns
In my experience I've found that wherever possible code should be WYSIWYG in terms of the effects per statement. Intent and the effects thereof should always be explicit per statement, not implicit, otherwise effects not intended will eventually slip in, and be missed.
It's hard to catch, and fix the effects of a statement intent where the statement in question is *implicit* because the effect is a *byproduct* of another statement.
Worse still, this sort of design encourages 'pyramid coding recursion hell', where some users will first decompose their program into respective scopes, and then return and compose them..atomically as possible, meaning execution flow becomes distorted, run time state becomes dependent not on obvious plain-at-sight code, but on the run time state itself. This I've found is a symptom of people who have spent too much time with LISP or other eye-stabbingly fucky abominations. Finally implicit returns encourage a form of thinking where programmers attempt to write code that 'just works' without thinking about how it *looks* or reads. The problem with opaque-programming is that while it may or may not be effortless, much more time is spent in reading, debugging, understanding, and maintaining code than is spent writing it--which is obviously problematic if we have a bunch of invisible returns everywhere, which requires new developers reading it to stop each and every time to decide whether to mentally 'insert' a return statement.
This really isn't a rant, as much as an old bitter gripe from the guy that got stuck with the job of debugging. And admittedly I've admired lisp from afar, but I didn't want to catch the "everything is functional, DOWN WITH THE STATE" fever, I'm no radical.
Just god damn, think of the future programmer who may have to read your code eventually.2 -
I'm about to take full responsibility for front-end solutions plus doing UI/UX design, and I've pretty much completed the official React and Redux tutorials.
In my defense I only said I was interested in UX but I have a creeping suspicion they think I'm a UX God.
I also used AngularJS for years and I feel that React speaks to me in a completely different way. It's exactly how I want to do things. Big fan of functional programming as well... So I think I'll thrive with React/Redux and friends if I can get some hours in before things kick off. It's just enough pressure for me to put in the work without feeling overwhelmed... for now.
It's thrilling though. I'm somewhere between excited that I'll get to show off my skills and scared that I'll be exposed as a fraud. I have a mild case of impostor syndrome though, so I think it'll work out in the end.2 -
I have lately seen a lot of people mentioning that functional programming is better than object oriented programming.
So far I have only experience in oop and I would really like to know some reasons why it is better.9 -
I hate it when someone says 'syntactic sugar' and on the other hand wants code to be readable. For me it seems that this are wheels which chain together.1
-
Lead: alright people what are your ideas and updates for this page refactor we've been talking about.
dipshit: Alright guys, I've done a quick awesome prototype that I really like...
dipshit: *starts to speak super fast* (I catch words about function composition, clean, no side effects, speed, efficiency. Basically a string of brogrammer buzzwords.)
me: what did you mean by that? How does it work?
dipshit: *basically repeats the same drivel*
me: uh..ok I don't quite understand
everyone else looks confused.
me: ok since you've done a prototype, we take a look at it later
*** After meeting, looks at code ***
It was COMPLETE GARBAGE. He used 1,500+ lines of js in 17 files to make what was essentially a simple 2 item list.
We were looking at a way to overhaul the entire page, he "refactored" maybe perhaps 5% of the page.
There was absolutely nothing clean / functional / composable about this monstrosity. It was as if he read chapter 1 of a book on functional programming and decided he understood enough to call himself an expert.
WHY THE FUCK ARE YOU STILL HIRED?
HOW DO YOU CALL YOURSELF A DEVELOPER?
YOU ARE SELF TAUGHT, DISS PEOPLE WITH FORMAL CS/CE DEGREES AND YOU PRODUCE TRASH CODE?!
ARE YOU SO RETARDED THAT YOU DO NOT RECOGNIZE HOW STUPID YOU ARE?
Please die in a fire, along with your jock attitude and unprofessionalism. Take this worthless junk unfit to be called code with you.3 -
Ban visual programming programs, like scratch after the fist month introduce them to enhanced Google search strings and let them code on the command line going from imperative, over functional to object oriented programming styles using languages suited for the current style. Not like using Java from the get go. I hated it, waiting until everyone got to the point where they kind of understood the logic but failed at using correct syntax and efficient coding styles.
-
My apologize to everyone I told that functional programming is declarative.
It's actually imperative. Thank you @AndSoWeCode for figuring that out. I spent the whole day thinking about it.
Lisp is imperative. It's just different way to define the exact data transformations, and that's quite imperative.
On the other hand, HTML, CSS, config files and markup languages are declarative.
But writing the imperative program which is configured with declarative configs seems like great idea. Consider Apache web server and others.3 -
I'm on leave but my brain won't stop thinking about ways to refactor that one js module I was working on yesterday into a functional one.
The fuck, brain?? I'm doing you a favor here by letting you take a day off! -
Functional-Declarative languages should only be esoteric ones. They are interesting for research and a mathematical toy, but they should not be used for programming languages used in the real world.
I currently try to write OpenSCAD code that places a list of modules, with information given from an array, with varying sizes next to each other. And is so hard and cumbersome. Whoever had the idea to cripple OpenSCAD by not having variables was stupid or sadistic.
The actual CPU run instructions, one after the other, there is no good reason to not allow some imperative elements in a programming language.24 -
I just realized that in my company , the code review is not important.... And the source code is fucked up.... The structure is like functional programming and Oop combine with redundant function everywhere.
And in the source code there's a folder called depreciating service , I asked them what is that , they told me it is the service previously but not recommended for using it.
I was like "you mean deprecated"? Omg
They don't care about code review and clean code here.
My struggle here is they dare to create one class for the entire project and every code are in that class...
This is fucking not acceptable. -
Not knowing what persistence was and copying JS objects with JSON.parse(JSON.stringify(...)) trying to make it “pure immutable”.
Fml.4 -
USE F🤬 GNU/LINUX!!! After, make technology really available (there’s cheap but functional options like ltsp). Teach the f🤬 bases of programming! Use open source softwares! How Internet works and privacy thing! Learn to read f🤬 terms of contract and privacy things, teach that ie is fucking shit and also, the most important thing! Use dark theme, don’t hurt others like I was!
And also, use vim -
Alright everyone. Who uses elixir and how do you like it? Thinking of writing a fairly large application using elixir and Phoenix5
-
Testing a script embed plugin I am building on various random websites, and came across this.
Like, bruh; have you ever heard of a javascript map? Basic functional programming? Or even a switch statement?
It's the same statement, over and over again, but with different parameters. Even old javascript had enough tools to do this with at least a basic stench of "efficiency"11 -
I learned to program with Game Maker, downloading examples and changing variables to see what they did. After that I wanted to make websites so I followed tutorials and just see what happened if I changed variables and functions. Then came High School where we had exercises with Java and just experimented with the possibilities.
Then in Uni I learned about OOP and Functional which opened even more worlds. After a class on design patterns and designing the architecture of a system, programming was never the same.
And even until this day, I haven't stopped learning better ways to code. Oh how I long for those days where everything is new and how I can build a hello world application and be truly excited about it! That is how I learned to program and why I won't stop anytime soon. 😁 -
Pet peeve: the claim that static typing prevents errors.
Today I worked on a C# project that's a mess of nulls, side-effects, inferences, and race conditions. Then I went back to a JS project that's twice the size but written in a clean, well-tested, FP style and currently has fewer than 10 issues logged.
Look, I get that there are upsides to static typing, and I'm open to introducing typescript or flow for our JS code.
I just can't stand the faux-concern from the static typing dingleberries when they are the ones who produce these horrendous lumps of unmaintainable shit, and the JS/Python/Ruby/etc people are over here quietly reinventing functional programming and code modularity.10 -
Did an interview and got some feedback and my coding challenge (I didn't make the cut) . Was surprised at a particular comment on why it was I didn't make the cut and it was about the code not compiling atall. So I went to check the repo and found some code which I oath to have removed lodged into the code base which prevented the reviewer from being able to compile it. How tf it wasn't flagged out when I was compiling before pushing to the repo is beyond me. Now I feel hella stupid and disappointed in myself 🤦🏾♀️ (to be fair it wasn't the only reason I didn't make the cut. The code could have being better)1
-
!rant
You knoe, my first insights into computer programming came out of spite. I thought windows to be garbage and wanted to blame someone other than myself for my machine constantly crashing. Thus I discovered programming and down the rabbit hole. But my interest in computer science came from videogames. Portal in particular. I found the idea of GlaDOS fascinating and thought that artificial intelligence would be something interesting to research. The web then gave me Lisp, and boy was the language different from all the other languages I went through. I remember feeling super excited when Racket, Common Lisp and eventually Clojure would help me discover many different ideas. Every time I work with reduce or maps or stuff like that in other languages I always thank languages such as Clojure for having me descipher different ways of manipulating data to get a result. To this day I feel sad whenever I find that my languages do not have the same constructs that Clojure has. I mention Clojure because it is my favorite flavor of Lisp. But one thing that always remains grest to me is firing up Emacs and plugin my code to Slime or Cider and see the repl pop up waiting for something to happen. This feeling is beautiful.
Please guys, if you have not tried it, do so! You might hate it at first or push it aside. But trust me, once you get it it will really change the way you think about programming in general. Try the great Clojure for the Brave and true, and go through the third chapter succesfully. If you do not like Lisp by them then no harm done! You would at least know that there are other options.
Now, here are some cool things:
For the standard implementation, try Common Lisp
For a more modern Scheme, try Racket or Guile
For targetting the JVM try Clojure (more akin to Common Lisp) or Kawa (scheme like)
For the python AST get Hy (pun totally intended)
For JS try Clojurescript
For emacs scripting try Emacs Lisp (has way too many disasdvantages but still relatively close to common lisp)
Honorific mention to more pure functional programming languages for Haskell, F#, Ocaml.
Also worth mentioning that Js , Ruby and Python have great functional constructs.
(println "you will not regret it!")2 -
Do you guys know a cool language to get a bit more into functional programming?
Doesn't matter if purely functional or a mashup of functional and imperative programming.
And please a real-world language, let Haskell stay in its Ivory-tower where it belongs.11 -
Starting to learn Haskell/type theory. I have put it off long enough and I hope this time I can get past the 5 minute intro/overview.
So far the only functional programming I have done is trying to write/use functions that take state in parameters only and limiting side effects (that I know of).
Expecting to have my mind blown and to get a monocle too.3 -
Should I learn Haskell? Would it help me with other coding languages as well?
My main language is JavaScript, also I would like to learn functional programming.2 -
A functional developer kills a man. When the police arrests him, he gets very surprised. He thought he was stateless.2
-
I'm learning functional programming for the first time with Elm and I kinda like it, it's just so different from what I'm used and kinda refreshing. My brain is getting a bit twisted though... I'll probably need a few weeks/months to adjust the way I think about code, but I'm liking the mental exercise so far, loving those moments where stuff just "clicks".5
-
React has been a gateway into the practical functional world.
Having a crack at Clojure/Om/Datomic, and then recognising the roots of functional and immutable programming that I've seen before.
I have a lot to learn.
Looking forward to grasping macros fully. Walk before I run though2 -
I came from a procedural background, then adopted object-oriented programming, and now I am very enthusiastic about functional programming. Is this kind of an evolutionary path as a programmer? Or am I just late to the party?
And what paradigm follows?5 -
How many of you feel functions API in Java8 should have support wiring up a Function and a Consumer :/
-
man... fuck java's approach to lambda expressions and like passing functions as arguments and the lot.
it's honestly just so terribly bad. it's sucks so much.26 -
3 weeks into Elixir and Functional programming in general. Words can't describe how much I love developing software with this toolset. Can this get any better ?4
-
As a part of a project in university, we are making an extension to a functional programming language, made in Scala. One of my groupmates had made some fancy logic with spawning threads, but we had some issues with multiple function parameters. Me and another mate have then spent like 3 days trying to figure out the problem, only to realise he forgot a $ sign in string interpolation for naming parameter. Talk about feeling like you're wasting time 🙃
-
Do we have any C# devs who have switched to Scala?
I've got a very sweet job offer... at a company that develops in Scala. On the one hand, I'm pretty pleased with my depth of C# knowledge, for a variety of reasons. And I've been targeting .Net shops in my job search.
They know Scala devs are rare, so they are aware they need to train new employees, which is nice. But I don't have strong opinions yet on whether this is a language I want to pivot to.
Does anyone have any thoughts/opinions/experiences?6 -
People who dismiss functional programming: **** you. Let them get phased out slowly and in a rot.
People who like functional programming but stuck at their current jobs: Let's build companies, competitor projects, pave the way for the future. Because we just know how good it is. :D31 -
To all who were influenced by the React license thing, watch this:
https://youtu.be/hnHsZQ1JDII
It's a really good explanation of the situation and how software patents and licenses work
PS. FunFunFunction does really cool videos about JS and functional programming so also check out his other stuff if you're into that kind of thing2 -
Silly question: what is the main difference between a procedural programming paradigm and a functional paradigm?7
-
Complete my Clojure POC and do a knowledge sharing session in work on Functional Programming. Also get promoted to Senior Software Engineer.
-
I wonder the creator of jQuery , Objective C , Erlang, what were they smoking while creating these programming languages......
Whenever I code in Erlang (server side) or Objective C (iOS) I can feel that the creator is damn high...
Objective C is weird that I have to call an object by allocation . Like get me thinking is that OOP? Or Functional.15 -
Did an intro to functional programming course in Scala.
Felt like I was able to touch the face of an immutable God. :')8 -
How do I become good with functional features(map,reduce,filter,zip,flatmap) in Javascript and Python?
It feels so alien. I'm so used to writing plain old loops.
Reading and undersranding this kind of style in other people's code is really hard for me, especially if all this is happeining on the same line.4 -
WARNING - a lot of text.
I am open for questions and discussions :)
I am not an education program specialist and I can't decide what's best for everyone. It is hard process of managing the prigram which is going through a lot of instances.
Computer Science.
Speaking about schools: regular schools does not prepare computer scientists. I have a lot of thoughts abouth whether we need or do NOT need such amount of knowledge in some subjects, but that's completely different story. Back to cs.
The main problem is that IT sphere evolves exceedingly fast (compared to others) and education system adaptation is honestly too slow.
SC studies in schools needs to be reformed almost every year to accept updates and corrections, but education system in most countries does not support that, thats the main problem. In basic course, which is for everyone I'd suggest to tell about brief computer usage, like office, OS basics, etc. But not only MS stuff... Linux is no more that nerdy stuff from 90', it's evolved and ready to use OS for everyone. So basic OS tour, like wtf is MAC, Linux (you can show Ubuntu/Mint, etc - the easy stuff) would be great... Also, show students cloud technologies. Like, you have an option to do *that* in your browser! And, yeah, classy stuff like what's USB and what's MB/GB and other basic stuff.. not digging into it for 6 months, but just brief overview wuth some useful info... Everyone had seen a PC by the time they are studying cs anyway.. and somewhere at the end we can introduce programming, what you can do with it and maybe hello world in whatever language, but no more.. 'cause it's still class for everyone, no need to explain stars there.
For last years, where shit's getting serious, like where you can choose: study cs or not - there we can teach programming. In my country it's 2 years. It's possible to cover OOP principles of +/- modern language (Java or C++ is not bad too, maybe even GO, whatever, that's not me who will decide it. Point that it's not from 70') + VCS + sime real world app like simplified, but still functional bookstore managing app.
That's about schools.
Speaking about universities - logic isbthe same. It needs to be modern and accept corrections and updates every year. And now it depends on what you're studying there. Are you going to have software engineering diploma or business system analyst...
Generally speaking, for developers - we need more real world scenarios and I guess, some technologies and frameworks. Ofc, theory too, but not that stuff from 1980. Come-on, nowadays nobody specifies 1 functional requirement in several pages and, generally, nobody is writing that specification for 2 years. Product becomes obsolete and it's haven't even started yet.
Everything changes, whether it is how we write specification documents, or literally anything else in IT.
Once more, morale: update CS program yearly, goddammit
How to do it - it's the whole another topic.
Thank you for reading.3 -
In React, OOP is now the old way of approaching react.js everybody doing functional programming/functional components.. this that the future ???26
-
It's impossibru: I'm doing RxJava + RxKotlin + RxAndroid and I'm understanding it.
Somewhat.
My tests pass, at least that's something. It's not yet doing completely what I want, but the hardest part is behind me. 🤩rant rxjava rxandroid reactive programming rxkotlin functional programming learning curve level 9000 rx1 -
Functional Programming being touted as the silver bullet for all types of modern programming challenges.
Why? As far as I can tell, it doesn't deliver. Sure certain approaches help with specific kinds of problems. Yet, it is cumbersome for general purpose problems and downright harmful for performance critical problems. For doing math problems it is great and I see value. For most else, eh, I have work to do.10 -
I realized only now that OOP is POO when read backwards. I wonder if this is a secret message encoded by somebody to make us all switch to functional programming2
-
Finish my only pet project;
Learn a new compiled language;
Get better at functional programming;
Read more books about networks and software engineering;3 -
My current side project. I’m doing a POC to upskill in functional programming. A Java/Dropwizard web service calling onto business logic written in Clojure. The bit im excited about is an HTML engine im writing in Clojure. So instead of inter-mixing raw HTML with code, my views will be written entirely in Clojure
-
Functional Programming Class, an assignment it's that we should develop a calculator, creating our own basic functions (addition implementation with a half-adder and string manipulation).
Teacher tolds us that it has to be coded in Haskell and for the GUI we can use whatever we want, then this fucktard comes around and speaks like he knows everything
Him: Oh, yeah we will use IntelliJ to link the Haskell code with a GUI, because IntelliJ supports Haskell
Me: But IntelliJ it's a(damn) IDE, you still need to code the GUI.
Him: But IntelliJ supports Haskell, we will use it to build the GUI.
Me: Yet what you're trying to say it's that you will use Java to create the GUI and call from there Haskell, and that you will use IntelloJ forms to create the UI
Him: No, no, we're not using Java, we will use IntelliJ, are you dumb? Don't you know what's IntelliJ for?
*Fucking facepalm*
I don't know but at this point I'm not feeling proud that THIS kind of retards are going to graduate in this year...3 -
I dare you to beat my wallpaper 🤪joke/meme wallpapers functional programming mobile dev wallpaper engine mobile development phones fun4
-
!rant
Do you think it is worth learning functional programming and specifically haskell. It seems like a really good concept, but a lot of people claim that it's not applicable in real scenarios.12 -
Working with technologies that excite me, which at the moment would be functional programming, CQRS, Event Sourcing, and the actor model, with a side of machine learning and serverless architectures. At a company that is large enough to pay well and grow in, but small enough that my contributions are recognized and appreciated. Or even better, one that I own and run.
-
dev && !rant
I am thinking about picking up a functional language. Currently I use Kotlin (and I fucking love that language) but I have to admit that it's support for functional programming is limited.
But I think their lies a certain beauty in fp and I want to do some project with it.
The 2 main problems are:
1. I have no experience in functional programming. I have no clue how to structure my program (potantialy without oop) and write clean testable code.
2. I don't know what language to use. Scala seems great since it has good IDE support and I like the Java ecosystem and Haskell seems to have more beauty but is missing that IDE support and it is very unfamilar for me.
So what do you guys think I should pick up? And how do I learn to write good software with it?17 -
Finally, I finally got my dream job, but three weeks after starting, I will say I am going into depression.
First, I have to learn a new language (the lang is less than 7 years old) on the job. The language is so different from the paradigm I am used to-from OOP to functional programming, it has very little confusing documentation and a small but growing community.
Though I have been able to show some work, goddamit, it's taking me blood and sand to adjust and be productive.
My onboarding tasks are fixing bugs and implementing a feature, and it has been like walking in a dark tunnel.
I have to face my problem alone as all the devs in the team have swapped.
I rarely sleep, and I recently started to have an existential crisis!
Also, I work part-time on another project, and my output is so poor due to the fact that I am trying to adjust to the new job. Just this evening, I got a call from the manager who was passively aggressive, complaining and asking me to rethink (a passive way of saying "you are fired, if you do not...").
I am feeling anxious. It is taking so much time daily to adjust to the new job.
Will the depression pass?10 -
Today, I used a curry function for the first time outside the context of a classroom/assignment, to solve a real-world problem. boy do I love functional programming.
-
I'm learning Rust as a case study for my own programming language. It's funny how many approaches exist to the humble loop.
- In classic procedural languages, a loop's job is to repeat actions, and as such it provides a multitude of tools to control this repetition.
- In all languages with iterators, a for-in loop is a construct that does something with every element of a collection. In languages with both iterators and generator functions, this can even be used to define a sequence in terms of another.
- In Rust, a loop is an expression that obtains its value through repeated execution. It can also be used like a classic loop, of course, but this is the interesting part.
- My little language is a functional language, so "loop" is the Y combinator. To loop means to define the value of an expression in terms of itself. It's the only looping construct, gets special treatment from the type checker and it's also used in recursive type definitions. -
Do any of you all have any recommendations on how to drill functional programming concepts into my brainhole? Any good resources or things that helped you learn? My brain is object oriented and I'm really struggling to "see the light" and become another FP hypebeast (which is what I feel most people become when they really learn this stuff)
Send help
Regards,
A desperate loser who doesn't wanna fail her course 🥺🤷13 -
React, it's declarative way of doing things, and the functional programming methodology it prefers.
Realized how much I've moved on from for-loops and class/object instance to maps, filters and immutability/observers when I worked on a Laravel project after so long and found myself forced to do things in the, erm, "PHP" way, despite spending my initial year and a half of programming working exclusively in PHP.
Sure, there's Class Components and imperative techniques in React but I had blissfully settled into using the flexible nature of doing things enabled by both native JS and React, with hooks, Lodash/Ramda and (almost fanatically) pure functions1 -
Just watched a video called "object oriented programming is bad" on youtube. Saying that we all should use functional programming only. Your thoughts?18
-
I'll go with IDEs (and multiple answers) for this.
In my *opinion*, the best IDEs are:
- IntelliJ and the other JetBrains products for almost any serious work. It's just too good (even though there are some bugs every now and there)
- VS Code for quick coding, hacking
- micro, if only a shell is available
Worst IDEs:
- Qt Creator: I just hate it, it's hard to configure, hard to use, big nope for me.
- Some IDE for the Clean functional programming language, which I've only used once and I don't know its name, but it was a painful thing to try to use back then (~3 years ago)2 -
Just starting with scala. And while I dig the more functional programming approach I am having the hardest of times dealing with naming higher-ordered functions, in my case a function returning another function.
Started out as `foo`, went through quite a lot of changes, and now it has become the beast: `createReplacePriceByPassengerConfigurationMapperFunction`. It won't stay that way but: GOSH! Naming. It's hard! Or I might as well suck at functional programmig. It's not like that these two things are necessarily mutually exclusive. -
What do you think of Elixir + Phoenix to build API’s? Is it a better choice than a more established language like Python or something more new like Scala or Clojure?
At my company we're going through a watershed moment where we're starting to discuss and think about re-building our digital foundations and nothing is off limits. I'm leading the discussion about our architecture where everyone can have their say into what the future looks like for our applications. We're currently on a Drupal (CMS) + PHP7/Symfony (Backend Content Repository) + Symfony Twig templates (Frontend)
Even though I have been developing in PHP most of my career, I personally love Elixir and spend a lot of my time away from work learning it but many of my reasons feels subjective like pattern matching, it's actor concurrency model, immutable data and not having to deal with classes/objects, and I'm not entirely sure how that translates to business value, advocating successfully for a tech stack change requires solid reasoning and good answers to challenges like how do we find Elixir developers when existing devs leave, how easy is it to build a CI/CD pipeline for Elixir/Phoenix, etc.4 -
Our company cooperates with a university in training students. In my time that meant learning about HTML, CSS and OOP in the first semester, so that we'd be able to actually do stuff in the company. Nowadays it means learning none of that crap but instead Racket. "What the flying shit is Racket", you ask? "Oh, it's a functional programming language. It has lots of parentheses!", student says. Well fuck me. Out go 2 days of careful planning what task they should be able to handle, in go 3 weeks of tutorials and explaining basic shit they are supposed to learn in university...1
-
I'd like to hear from developers which prefers Angular to React the reason of said preference.
I want to hear that becasue I like React way more than Angular since I find which is easier to learn (making a form with a React hook is easy while it takes days just to get a grip on Angular forms), it usually takes less code to do things, it doesn't force libraries which may not be necessary for your use case and just makes your bundle bigger (for example most things which are done in NgRx can be done just as easily with regular JS promises without the need of an external tool) and I generally prefer functional programming to OOP.
Said that I want to hear the other side, not to argue but because I want to know cases in which Angular may be a better choice than React to become a better rounded dev.10 -
!rant
Continuation from: https://devrant.com/rants/979267/...
My vision is to implement something that is inspired by Flow Based Programming.
The motivation for this is two fold
* Functional design - many advantages to this, pure functions mean consistent outputs for each input, testable, composable, reasonable. The functional reactive nature means events are handles as functions over time, thus eliminating statefulness
* Visual/Diagrammable - programs can be represented as diagrams, with components, connections and ports, there is a 1 to 1 relationship between the program structure and visual representation. This means high level analysis and design can happen throughout project development.
Just to be clear there are enough frameworks out there so I have no intentions of making a new one, this will make use of the least number of libraries I can get away with.
In my original post I used Highland.js as I've been following the project a while. But unfortunately documentation is lacking and it is a little bare bones; I need something that is a little more featureful to eliminate boilerplate code.
RxJS seems to be the answer, it is much better documentated and provides WAY more functionality. And I have seen many reports of it being significantly easier to use.
Code speaks much louder so stay tuned as I plan to produce a proof of concept (obligatory) todo app. Or if you're sick of those feel free to make a request.3 -
What's your opinion on functional shortcuts and 'hacks' in many languages, like map/reduce/filter, ternary operator, lambdas,inner/anonymous classes?
Imo they can make development faster and more efficent but they make the code very unreadable, especially if someone else has to read it, Therefore I try to use them only when it's appropriate. My dev friends use them too much and it makes reading their code a hellish experience, especially in Javascript with Rx.3 -
Our industry is filled with really smart people.
So how can we understand complex functional/OO programming, devops and all the rest of it. But not understand how to estimate something on a scale of difficulty and instead prefer to give a fixed estimate and be held to it31 -
Implementing a for loop in js because I need to skip some elements in a map as I transform. I'm feeling dirty
* cries in functional *4 -
Functional programming, Reacts! Because that's what the cool kids are using now... nice rant https://hackernoon.com/how-it-feels...
-
Having a hard time thinking the alternates to if statements is a good idea. I was genuinely curious how this was done. The examples I am finding seem to just spread the logic everywhere across multiple objects. To me this makes the logic objectively less clear. I didn't understand the obsession with objects until I saw the examples that creates a fuckton of boiler plate objects. How someone can say this is preferred over a few if statements boggles my mind. I actually am trying to understand the functional mindset as well. It is not going well for me. I can sorta see some value in using a map. Technically a lookup could be faster. But again it spreads the code all around adding more boilerplate.
https://blog.bitsrc.io/reduce-if-el...
https://dev.to/phouchens/...
Is it because these are contrived examples? I initially searched to find ways of reducing ifs in a functional approach. I did find it in the second example. I was however hoping to find that by lazy eval or something. I see people making references to how one you "get it" functional logic is easier to understand and evaluate. I cannot tell if this is straight up gaslighting or my brain is just too fucking imperative.11 -
Things I want to accomplish in 2023:
- learn rust
- learn a functional programming language (elixir probably)
- finish the O'Reilly book about microservices
- learn and contribute to gnunet
- read at least other 2 books about SE
Regarding the last point, I've always underestimated SE books.15 -
Angular - object oriented programming
React - functional programming
---
Now i fucking understand why nextjs does not have any design patterns. No folder structure for it either. Every project is fucking random and you need to learn every fucking project from scratch cause people stuff shit into different folders and file names1 -
I hope that when I wake up in the morning, the racket code I just wrote from midnight to 3am makes as much sense to me as it does at the time of writing.
Banana Language always seems to flow easier when exhausted. -
One of my supervisors once said: "A computer without mutable state is just a glorified electrical heater."
Meaning that at some level you'll need some mutability.
A processor/memory unit without mutability is not worth very much, except if you want to build a new one for every clock tick...3 -
What fo you think, is it still a good idea to learn fortran in order to learn programming concepts?
I don't know what else would be nice...
I only had experience with shell scripting, which is rather functional.
Other languages i considered were dlang, c#, go and rust.
I have no explict application, which bothers me a lot.3 -
Tired of imperative different-yet-all-the-same programing languages. What's the most awesome funcional language ever?
Bonus: sweet projects you've done in that language9 -
I love FP for sure, but it kind of looks weird in PHP. Tough I realy like the desgin of this website.
https://phpslang.io4 -
Programming Paradigm Convergence.
I can already see it in JS and C#. Both have functional/OO aspects and keep growing more similar in terms of language features.
I'd rather see OOP die a fast and horrible death though 🤷♂️6 -
I was always into computers, ever since I was a kid. Played a lot of videogames on Windows 98 and XP, and a lot of my earliest drawings were level ideas for those games. My first encounters with code were with game creation software like GameMaker, but I barely touched the code proper outside of editing a few variables from other people's code. After that I basically forgot all about it and spent most of my teen years being a shutin.
Skip ahead to my last year of high school without much idea on what to do. I was good at math when I wasn't being a lazy shit, so between that and what my parents expected of me, I was prepared to go to university for civil engineering. However, two things changed that decision, the first being a great IT professor, when me and a friend were so far ahead, he started assigning us some harder work, and suggested we study computer science at university. The second was a super jank and obscure open-source early 2000's game that somehow still has a thriving community and is actively being developed. I stumbled upon it by chance, and after playing for a while, I submitted a balance change on the GitHub repo. Even though it was just a single variable change, that time I got it. That time I saw how powerful programming could be and what could be done with it. I submitted PR after PR of new features, changes and bugfixes, by the time I left there I had a somewhat solid grasp of the fundamentals of programming, and decided to enrol in the computer science degree.
Enrolling was possibly the best decision I ever made (not america; debt isn't an issue), as well as giving me actual social skills, every course I took just clicked. The knowledge I already somewhat intuitively had a vague grasp on from videogames, general computer use and collaborating with russian coders who produced the jankiest shit that was still somehow functional was expanded upon and consolidated with a high-quality formal education. Four years later and I'm fresh out of uni, it was a long road between when the seed was first planted in my mind and now, but I've finally found out what I want to do with my life.
won't know for sure until i find a job though ffs -
Lisp is such a cool language, and I feel like because functional programming is becoming so popular, Lisp could end up the go-to language because it's so versatile and, though there are many parens, it's friendlier at first glance than Haskell. (And there are so many libraries for it, omg)6
-
Trees -> declarative programming
Loops -> functional programming
Sequences -> imperative programming
Graphs -> dynamic programming
Good mapping, yeah or no?15 -
So, I have a pretty decent understanding of big complete languages like Java, I build android applications following several design patterns, solid principles, building big stuff with databases and servers and libraries interconnected with gradle, tracking everything with git, using tdd and functional programming capabilities blablabla ... And I still have trouble making sense of a FREAKING STUPID SHELL SCRIPT I MEAN WHO CAME UP WITH THAT SINTAX I HATE IT SO MUCH OMG I CAN'T EVEN
But for real everytime I need to read a '.sh' I literally wanna throw my computer away and die. Am I alone? -
what would you guys say is the archetypal functional language, the one we should pick to learn functional programming?3
-
That time you are programing some project and you just curried a function naturally and you ask to yourself: "Does it mean I know Functional Programming?"
And you put a spoke in your own wheel right away: "Don't be silly".
:P1 -
to be honest, i hate every OOP, in my opinion it's just add complexity in every way. yet i would like to use Functional Programming but it's fukking hard to learn and hard to get use to. Tryna get used to Haskell.4
-
A colleague of mine said that functional programming should be banned by law. He finds it so hard and at the same time the only language he knows is JavaScript
-
It's getting on my nerve to constantly change from one programming language to another in one semester. We are learning web development (html css js), functional programming (haskell), speech analysis (matlab) and logical programming (prolog). It's driving me kinda mad having to change the approach for each assignment every few days.2
-
Finding it hard to focus. I'm into UI, backend, frontend, iOS... Exploring FP. We've just had our first child and I need to put my time and energy into what will a) provide healthy financial remuneration b) be more enjoyable than frustrating c) be relatively futureproof (if that's even possible). For some reason I have a huge distaste for JavaScript (as an ecosystem) which has led me to look into Elm. I've enjoyed Ruby but something in my mind tells me Functional programming is more logical for me. It's a whole new approach and skill to level-up on. I love programming my own back-ends, but for me, design is so important and I want to be part of the visual, tangible part that people interact with. I'm a one-man operation which means I do design, full stack Development, client liaison, financials, client acquisition. Freelancing is a double edged sword - I don't know when the next project will come, but I also need to focus on the projects I have without taking too much on. At times I think employment would be good, despite having it's on drawbacks which I read about repeatedly on here. Any advice?1
-
Good Lord!
FP looks nice, feels right, scratches the itch when written well, but supporting, debugging and fixing/extending it is a fucking hell!
Well, it's either FP or TS/Node.4 -
Anyone interested to see mine and my wife’s culture & technology crossover performance/arts/music project?
The name is UDAGANuniverse. Udagan in Sakha (northeast Siberia) language toughly translates to ‘she shaman’. I met my wife while she was touring in Europe with a traditional Sakha group (I was touring Celtic trad music that time).
The project is incorporating all our interests, artforms and professional skills under a shamanistic aesthetic. Functional Programming, Live Coding and Machine Learning play a big part in my input and live performance role.
First episode of our newly launched podcast:
https://udaganuniverse.com/news/...
My personal articles — arts based and touching on functional programming + category theory:
https://udaganuniverse.com/music
I’ll be posting new articles more specifically on Coding and ML in performance in the next weeks.
If you’d like to see a little personal backstory (how we came to fuse performance with code/ML) check out this rant here:
https://devrant.com/rants/1279742/...
Hope that you enjoy and please let us know any comments or feedback!3 -
I hate the fucking Spring WebFlux and the goddamn Project Reactor on which it depends!
Even debugging a simple CRUD microservice with simple business logic is such a pain in the ass, exception handling has a lot of "magic" implicit stuff which makes me waste hours in fucking trial & error and I have to use very little breakpoints because if a request is paused for more than few seconds it gets terminated.
I love functional programming but why shove it in fucking Java making me waste 90% of my time in trying to guessing what the fucking framework is doing, why not just use Scala which runs in the JVM? We don't even need compatibility with legacy code since it's a greenfield project!
And before you ask yes, I read a fucking book about Project Reactor and Java reactive programming and a lot of docs on Spring, Spring Boot and Spring Web Flux.2 -
Half of the courses we had in our college were about electronics. Except Microprocessors and Transistors, it's not relevant.
We even had chemistry and engineering drawing. So we essentially wasted more than half of our time.
Besides languages, weren't taught anything about real world software development.
Nothing about how to work with an existing code base, version control, design patterns, system design, creating a website, debugging, functional programming, scalability, reliability.
The industry should be involved in setting the syllabus and also contributing part time teachers.3 -
Any recommendations for a first timer of functional programming? Not sure what languages are used the most or have the most community support. For whatever it's worth, I've enjoyed working with C# and Golang, and disliked working with JS and PHP.5
-
Biggest hurdle right? That would be finding it hard to wrap my head around functional programming...it's just not getting in.. I need help pls.2
-
when you used to functional programming, every time you see a for loop, you can not resiste but to refactorit.
-
Ugh, fuck man. I had planned an extremely general function for printing a truth table for a given proposition for a course, with a little functional programming thrown in. Instead, we are just supposed to show all 2^8 possible truth tables for 3 variables. That's eight nested loops with a hardcoded string that you inject the 8 values in.
I feel so disappointed1 -
I’m learning Haskell and my mind is blown by how elegant functional programming is, it might take a while for me to get accustomed to FP but I can’t wait to get there. Thinking of making the 2048 game in Haskell as a learning exercise3
-
Arghhh! Reactive programming took away all the fun, but oh well, we can be more lazy now. Functional programming just made a big come back this year.2
-
Sharing the repo for a POC im working on right now for anyone interested in Clojure. Im building a web app which serves static HTML generated by a custom engine. You can literally write HTML in Clojure. Its still very much a work in progress.
https://github.com/LikeLikeAteMyShi...2 -
I think I understand now why people dislike continuation passing style for side effects. The continuations passed to the action can be called in any pattern, there's no inherent guarantee that an error handler cannot be called just because the corresponding success handler had already been called. In this regard they act like jump points in assembly more than functions in an equation.
I don't think this is such a massive problem. The entire imperative world is built on such things. I definitely think though that this model does not mix with autocurry. -
Sydochen has posted a rant where he is nt really sure why people hate Java, and I decided to publicly post my explanation of this phenomenon, please, from my point of view.
So there is this quite large domain, on which one or two academical studies are built, such as business informatics and applied system engineering which I find extremely interesting and fun, that is called, ironically, SAD. And then there are videos on youtube, by programmers who just can't settle the fuck down. Those videos I am talking about are rants about OOP in general, which, as we all know, is a huge part of studies in the aforementioned domain. What these people are even talking about?
Absolutely obvious, there is no sense in making a software in a linear pattern. Since Bikelsoft has conveniently patched consumers up with GUI based software, the core concept of which is EDP (event driven programming or alternatively, at least OS events queue-ing), the completely functional, linear approach in such environment does not make much sense in terms of the maintainability of the software. Uhm, raise your hand if you ever tried to linearly build a complex GUI system in a single function call on GTK, which does allow you to disregard any responsibility separation pattern of SAD, such as long loved MVC...
Additionally, OOP is mandatory in business because it does allow us to mount abstraction levels and encapsulate actual dataflow behind them, which, of course, lowers the costs of the development.
What happy programmers are talking about usually is the complexity of the task of doing the OOP right in the sense of an overflow of straight composition classes (that do nothing but forward data from lower to upper abstraction levels and vice versa) and the situation of responsibility chain break (this is when a class from lower level directly!! notifies a class of a higher level about something ignoring the fact that there is a chain of other classes between them). And that's it. These guys also do vouch for functional programming, and it's a completely different argument, and there is no reason not to do it in algorithmical, implementational part of the project, of course, but yeah...
So where does Java kick in you think?
Well, guess what language popularized programming in general and OOP in particular. Java is doing a lot of things in a modern way. Of course, if it's 1995 outside *lenny face*. Yeah, fuck AOT, fuck memory management responsibility, all to the maximum towards solving the real applicative tasks.
Have you ever tried to learn to apply Text Watchers in Android with Java? Then you know about inline overloading and inline abstract class implementation. This is not right. This reduces readability and reusability.
Have you ever used Volley on Android? Newbies to Android programming surely should have. Quite verbose boilerplate in google docs, huh?
Have you seen intents? The Android API is, little said, messy with all the support libs and Context class ancestors. Remember how many times the language has helped you to properly orient in all of this hierarchy, when overloading method declaration requires you to use 2 lines instead of 1. Too verbose, too hesitant, distracting - that's what the lang and the api is. Fucking toString() is hilarious. Reference comparison is unintuitive. Obviously poor practices are not banned. Ancient tools. Import hell. Slow evolution.
C# has ripped Java off like an utter cunt, yet it's a piece of cake to maintain a solid patternization and structure, and keep your code clean and readable. Yet, Cs6 already was okay featuring optionally nullable fields and safe optional dereferencing, while we get finally get lambda expressions in J8, in 20-fucking-14.
Java did good back then, but when we joke about dumb indian developers, they are coding it in Java. So yeah.
To sum up, it's easy to make code unreadable with Java, and Java is a tool with which developers usually disregard the patterns of SAD. -
I hate university projects, they are so dumb sometimes.
Now I am supposed to write a Haskell like functional programming language using C++ templates, and I have 10 days to do it...
I'm looking forward to a day when I could finally wave the middle finger to this institution.4 -
Functional programming course starts today. I'm really looking forward to it, but it is so early compared to my other courses10
-
I am planing to create a reading list for technical books and am looking for recommendations.
Currently I have:
- Spark: The definitive Guide (need it for a university project)
- Clean Code
- Clean Architecture
- Functional Programming, simplified (or any other beginner-friendly book about FP)
Do you have any recommendations and must-reads for a more junior developer? I am looking for stuff about FP, Code Quality, Java, Python, Scala, and any general interesting technical stuff.3 -
data Word: A Word is an unsigned integral type, with the same size as Int.
And here I was thinking a word is a string! And that's not all, there is also Word8, Word16 and whatever else.3 -
rust anyone? i am a c++ person, and it caught my attention as having an oopish-but-actually-functional new programming paradigm whatever... also (don't know if it's just mozilla's successful marketing) i had the impression that people see it as the new whiz kid in town. do you recommend indulging in it for the sake of trying something new?1
-
Ok so guys, I really love back-end, but sometimes I'd like to do a complete software to show off to friends in my free time, So question:
What programming language should I learn to make gui softwares?
I don’t want them to be pieces of art, just functional and with not too man " unintentional features".
I really love Python, but for gui heard it's meh, but may be wrong
I don't want web technologies
looking forward to learning C, but not necessarily for gui
could try c++ I guess
Don’t want .net (coz you know ms and their Java knockoff)
Ruby seems cool, but it seems to be annihilated by ruby on rails
Not Java but Kotlin seems really cool, could also go with scala, idk
Forgot the other things3 -
Recently I've been getting sucked further and further into functional programming. Started with learning Java 8, and when toying with Streams I was looking into different features (dropWhile and takeWhile) which lead me to Java 9. Now I find myself fluent in Scala and learning Haskell. When does it end 😵5
-
Do you think, that its a good idea, to add FP-features like Map,Filter,Reduce to Stack or Queue datastructures, in the way, that they pop all elements?6
-
if anyone is familiar with immer js or immutable js:
if the producer copies the base state to nextState, and nextState is a const, doesnt that defeat the purpose?
I mean you're going for immutability, which is great for say an undo function, or for finding bugs, but what are you doing with all these immutable values now hanging around in memory?
I assume each new state returned is being pushed onto an array? (because you cant stuff it into nextState because nextState is immutable).
Wont this lead to memory usage increasing over a user session, the longer the session lasts?
I feel like I'm misunderstanding some core concept here.
edit: also what the hell is structural sharing?18 -
I'm a bored PHP developer 😑.
I want to learn functional programming. Which one is good..?
Any suggestions folks..4 -
Someone posted a pic of 'funfunfunction' channel on YouTube. I saw the post and decided to check his video. Just 4 videos after, I felt so inspired that I decided to write my own blog post on functional programming with Python. Gotta love this community for bringing everything together at one place
If anyone is interested, here is the link to my post https://varundey.me/blogs/... -
Anyone out there a Scala fan? I am! Seems like most of the stories here are quite negative but positively is my thing so here's my 2 cents:
Scala is an amazing data processing language. It's a functional language with a lot of really great things like a consistent collection library api, case classes, brilliant async library's like Akka Actors, and plenty of solid learning resources like Twitter school and Martin Odersky's online course.3 -
possibly my first !rant
Any Clojure programmers around? I started learning it seriously the other day and I have to say Im hooked. Im pretty new to functional programming and so far Im really liking it. It amazes me how much functionality you can produce from 2-3 nested function calls.2 -
Best thing: Getting into some pure functional programming
Worst thing: Being forced to work with VS2013 -
Is there anything like React Context or Unix envvars in any functional language?
Not global mutable state, but variables with a global identity that I can set to a value for the duration of a function call to influence the behavior of all deeply nested functions that reference the same variable without having to acknowledge them.13 -
One of my Computer Science modules this year revolved around completing a team project, and one person in the team basically fucked it up for all of us in the last minute.
We had to create a simple task management app for a fictional company, the university did not care about how the program looked and all that mattered was if the app is functional or not. The app relied heavily on a database, so all we basically had to do was get, modify, and add data from a database. Now this person did his part of the programming, but with an outdated database model and did not even test his code as he said MySQL wasn't working on his home computer.
2 days before the final deadline is when we decided to merge everything together in the git repo (as that's when the rest of us finished our tasks), and that's when we found out none of his code worked. We then spent the next 48 hours with little sleep to try our best to fix everything, but unfortunately due to his tasks carrying a majority of the complexity of the program we couldn't fix it all in time and we ended up losing roughly 50% of the marks.
This all probably could have been avoided if one person in the team did look at his git branch properly, but this person was the programming lead of the project and didn't ask for any help at any point until the last moment when we merged everything together. Oh well though, at least I've learnt better for the next team project that I do2 -
That moment that you realize that you have more experience than your college teacher...
Me: Can you tell me why a tail recurcive function in a functional programming language the stack and memory do not increase?
Teacher: I don't know what is a tail recursive function...
Me: Ok....
I feel like I am wasting time... -
Make good progress on Orchid, my pet project, the functional programming language that has no syntax apart from what the macros define. A type system, an interpreter and provisions for a compiler would be nice for a start.
Finish my bachelor's degree on some unspecified part of Orchid, at the current pace that would most likely be just the Hindley-Milner algorithm.
Don't get fired from the gem of a job I have, and move to London because I'm a city rat and the only way I can sleep well apparently is with a tram or drunken people screaming under my window.2 -
One-hot encoding is fucking garbage. Everyone loves using this useless stupid shit that doesn’t work.rant omfg stop it please talent time wasted trend functional programming tech emotions noobs fuck this shit wk2523
-
So functional programming is basically using prebuilt libraries anf functions and not write a single line of logic?3
-
What you do ?
Competitive programming (CP) or Functional programming (FP)?
And if you FP then how much competitive programming you think you need in your job or whatever your current scenario is .14 -
A philosophical question about maintenance/updating.
There is no need to repeat the reasons we need to update our dependencies and our code. We know them/ especially regarding the security issues.
The real question is , "is that indicates a failure of automation"?
When i started thinking about code, and when also was a kid and saw all these sci fi universes with robots etc, the obvious thing was that you build an automation to do the job without having to work with it anymore. There is no meaning on automate something that need constant work above it.
When you have a car, you usually do not upgrade it all the time, you do some things of maintance (oil, tires) but it keeps your work on it in a logical amount.
A better example is the abacus, a calculating device which you know it works as it works.
A promise of functional programming is that because you are based on algebraic principles you do not have to worry so much about your code, you know it will doing the logical thing it supposed to do.
Unix philosophy made software that has been "updated" so little compared to all these modern apps.
Coding, because of its changeable nature is the first victim of the humans nature unsatisfying.
Modern software industry has so much of techniques and principles (solid, liquid, patterns, testing that that the air is air) and still needs so many developers to work on a project.
I know that you will blame the market needs (you cannot understand the need from the start, you have to do it agile) but i think that this is also a part of a problem .
Old devices evolved at much more slow pace. Radio was radio, and still a radio do its basic functionality the same war (the upgrades were only some memory functionalities like save your beloved frequencies and screen messages).
Although all answers are valid, i still feel, that we have failed. We have failed so much. The dream of being a programmer is to build something, bring you money or satisfaction, and you are bored so you build something completely new.13 -
val true : bool = isFrustrated(me : Human)
1) Honestly fuck SML. Who's goddamn idea was it to make a useless fucking programming language that does absolutely nothing relevant unless you're trying to learn recursion. Who's fucking idea was it to not be able to even have side effects. And who gives a shit if you can explicitly declare the type of variables on every single fucking line that's what comments are for if you really need it. All this is aside from the fact that nobody ever has been like "OH UNMUTABLE TYPES? WOW IM SO HAPPY THIS IS SO USEFUL". At this point I feel like SML is basically a DFA - ABSOLUTELY FUCKING USELESS
2) Aside from that, who's idea was it to duplicate two classes. There's 15-122 (Principles of Imperative Computation) and 15-150 (Principles of Functional Programming). So far the ONLY fucking thing different is we learned about work and span in 15-150 - OTHER THAN THAT ITS LIKE TAKING THE EXACT SAME COURSE. BUT AGAIN. So then I have to fucking sit in lecture and pay attention for that tiny bit of information that is new amongst the giant cesspool of information that isn't. BECAUSE I ALREADY LEARNED IT.
Oh and did I mention that both classes are required to graduate as a CS major? Fuck me.
Thanks devRant for helping <3
Edit: We are 4 weeks into the semester so you'd expect we'd have gotten into the new stuff by now right????5 -
Help me out a bit, functional programming fans!
I'm experimenting with functional programming through JavaScript.
I created some dummy data to experiment with and created a simple function to query the data. I would like to get all elements, whose type attribute is not 'x'. A simple solution can be seen under the 'original code' part.
Under the 'fully functional code' part I gathered some frequently used general purpose functions, which I assembled into the function composition at line 45.
I'm having a bad taste in my mouth and feel that I've gone too far. I basically replaced every language element for a function. Is this the goal of functional programming? Is this how a perfectly functional code should look like?1 -
Coolest but probably most unnecessary feature in the dev world: A whitespace (programming language) to Java bytecode transpiler. Well I kinda started, but never finished actually due to lack of motivation to really finish it. At least the Parser and Interpreter were fully functional.
-
I know this is a recurring question. What language to learn in 2018?
Kotlin, scala, elixir, rust, go, ...?
I need something practical and preferably a language that at least partially supports functional programming patterns. Oh and also I don't want to learn Haskell. Thanks.4 -
I lost the enthusiasm I had for just programming languages mostly functional languages. I see my peers who were already in the game. I came late, did all the functional hardcore bullshit and become a top pro and now lost interest.
Now its until and unless I don't see something working end to end nicely, go fuck your shit. But regardless fuck OOP3 -
Does anyone know where B, D language, Haskell, Scala, COBOL, Fortran and other unfamous languages are used? I know that Scala and Haskell are functional programming language but I don't know where it is useful and COBOL was used in US army but I never hear about them.3
-
What's the easiest functional programming language for someone with experience with imperative languages?
I would like to learn a functional language to broaden my horizons. I have knowledge of Python and C / C ++ and I want the language to be easy to learn from someone who comes from the imperative realm of languages. I don't care if the language is strong enough. I just need a language to learn the basics of a functional programming language, and then I'll try to find a more complex (and powerful) one.
thank11 -
Functional programming in a one liner:
const value = (define_value, start) => value(define_value(start))1 -
!rant
Am I the only one who has made a semi-functional compiled programming language because they're bored?2 -
Sometimes I think that TypeScript is like a poor developer's Haskell. I thought "Isn't this supposed to support functional programming?" and searched for a way to do currying or partial application, and only found hackish solutions :/ Then again, maybe I don't know Haskell well enough to make a proper judgment.1
-
Newbie here ! What do experience pro grammars think of the recent wave of “OOP is garbage” comments on the internet ? Is OOP truly on the decline ? Or is it that OOP should be a feature of a language while coding rather than a “everything is an object” mentality.5
-
I am in Nepal and most of the people here don't think functional programming is a best approach ( I personally think it is ) what's your situation?4
-
Backend wise
After a year and a half of working with what i love (nodejs microservices and bit of python) I have to update my php skills and refresh my memory with latest Laravel 😕 (I used it as an authentication/authorisation and REST backend for a react native app early 2016 and did not touch it since)
Passive Job hunting sux and yes PHP ain't my thing anymore 😔 i mean i have next to 6-8 years exp in it but given the choice... 😒
I used to love it (so many good memory with cakephp 😌🙄it teached me a lot early in my carrer) before I discover functional programming paradigm and got deep understanding of JS -
I want to learn a functional programming language, hoping to start off with HASKELL. any suggestions?5
-
Started looking into pseudo functional programming in JS.
Instant love...!!!
Writing monads composing together with curried function passing beautiful immutable data...
While listening to Fur elise Beethoven....!!
Coding bliss..!!! -
As a junior, mild and hacky OOPer/TDDer I once worked with an architect who professionally introduced me to functional programming obsession and TDD fanatism.
I'm not a junior anymore, I have less dev friends too, but now none of them has unforeseen side effects or unexpected behaviour. -
It's me or the "Reactive Functional" Spring WebFlux is a stupid fad? It's hard to train new developers on it, a PITA to debug and there isn't any study which proves which it brings better performance compared to the classic Spring MVC.1
-
Just something I've been thinking on for a while:
How could programming be done if we couldn't use ordinary if-statements (but functional set operations such as map, filter, with an if- in the lambda function etc. is alright).
Could it work? Also would it be possible to reduce the amount of while loops by using functions for most of the "loop situations" as well?4 -
I'd like to learn about functional programming. What books, courses, tutorials or articles would you suggest? I have a good understanding of abstract algebra and I felt the need to learn it because my Typescript is a mess and I visibly don't know what I'm doing.1
-
I'm enjoying learning Elixir:
MyFear(Elixir)
|> Udemy(Awesome_Elixir_Couse)
|> Phoenix.Framework
|> Awesome.App
Feeling #empowered, sharing some elixir love... -
Here are few questions that you could expect when attending a Java interview
1 - In which programming paradigm Java 8 falls?
2 - What is MetaSpace? How does it differ from PermGen?
3 - What are functional or SAM interfaces?
4 - What are static methods in Interfaces?
5 - What are the various categories of pre-defined function interfaces?2 -
Learn git. Contribute to open source projects - you may learn more from code review on a single PR than from a whole tutorial. Ask questions constantly. Learn more git. Look for the cleanest solution to a problem. Write code that is easy to improve, easy to expand, and easy to debug. Learn even more git. Don't limit yourself to thinking only in terms of OOP, or functional, or procedural, or whatever type of programming you may be comfortable with. Don't be afraid to do some work by hand. Learn git, so that when all comes crashing down and your team crumbles to pieces, when your relationships fail and your friends disappear, when you're down on your luck and there truly is no hope left in life, you can check out of the dangerous world of your current HEAD and return to the home and comfort of your master branch, which you've kept safe, secure, and functional.
-
Just seen F# and really like it. Sadly its compiler throws all kinds of errors on Linux with Mono because for some stupid reason it uses the Mono 2.0 DLLs...undefined lots of debugging tomorrow whyyy it said that it ran on linux all will be functions hail functional programming
-
Why do Haskell/Scala/Lisp/Clojure develops do crossfit?
Because they like their fitness how they like their programming paradigms: functional! -
Functional programming in a nutshell
isRepost && sorry()
/**
* From Reddit : https://reddit.com/r/...
*
*/4 -
Being new to NodeJS, I wanted to use the framework for a small script that involved connecting to a MySQL database and updating 1500+ records.
With NodeJS's preference towards functional programming over sequential, I wanted to do things the NodeJS way with callback functions instead how I'm used to doing it, using loops (and all the MySQL functions were async).
I couldn't update all the rows at once, so I wrote a callback function that calls back itself after the SQL statement is executed. A recursive callback function... am I doing this right?7 -
Make a full application in elixir with Phoenix frameworks
Deeper understanding of functional programming -
"Syntactic sugar is syntax within a programming language that is designed to make the language 'sweeter' for human. But...don't consume it too much!"
"Why?"
"You will be diabetic."
"Oh..."