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 - "functions"
-
All the stupid date functions where the days range from 1 to 31 but the months range from 0 to 1120
-
My internship at startup:
Dream: Lots of coding
Reality: Maintaining Excel sheets for API functions.😑14 -
Add functions inside of jquery.min.js file just because im too lazy to add script source to html file6
-
PHP's lack of consistence in naming conventions with built-in functions. For example, str_split() and strlen().8
-
"How to name your variables and functions so they can be understood by other humans" should be a mandatory lesson right after someone writes their first ever computer program.15
-
It's not that I hate PHP, I just hate the lack of consistency in standard function naming and parameter order, nonsensical attribute access, nearly-meaningless comparison operators, reference handling, case (in)sensitivities, and more!
I mean, look at these functions:
strtoupper(...)
bin2hex(...)
strtolower(...)
And look at THESE FUNCTIONS:
array_search($needle, $haystack)
strpos($haystack, $needle)
array_filter($array, $callable)
array_map($callback, $array)
array_walk($array, $callable)
And let me jUST USE SOME ATTRIBUTES:
$object->attr = "No dollar sign...";
Class::$attr = "GOD WHY";
HOW ABOUT SOME COMPARISONS:
(NULL == 0) // true
(NULL < -1) // ALSO true
Functions AREN'T CASE SENSITIVE (at least variables are).
Wanna dereference? TOO BAD, YOU'LL HAVE TO GET OUT THE TNT.
Alright, yeah, I hate PHP.19 -
I kid you not, this was in some of our official corporate training.
Unfortunately, this often is how our business area "functions"6 -
When your brain only functions at night and morning meetings with your team make you look like you never coded in your life.1
-
Been using the same language for 5 years... still Googles basic functions to remember the arguments.12
-
end of my functions:
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))7 -
C is not that hard:
void (* (* f[ ]) () ) () declares f to be array of unspecified size, of pointers to functions, which return pointers to functions which return void.
By the way, I am uncomfortable with the fact that I am comfortable with this statement.6 -
The fact that we can’t control all the functions and organs in our body means that we don’t have admin privileges.4
-
Dear Developers,
A. Please put your fucking functions in files with names related to the purpose of the functions.
B. Don't define your database management methods in your goddamn configuration file.
C. In addition, fucking document your shit at the top of the file if you refuse to abide by request A.
Someone is going to maintain or modify this code after you, and that person will have a hell of a time with it.3 -
What the fuck has one of my clients been up to?! Every request he makes he suggests we might want to do it via a function.
"We need to ensure this is password protected. Maybe wrap the calls in a function."
I wander if he goes into the bakery and says, "I need a loaf of bread---use flour."
All I can think of is that someone influential in his life is an FP zealot and he's latched onto this word.
But, I quite like FP. Maybe I'll refactor everything to static classes to meet the requirement.
Hope to Christ he doesn't find out about HTML, etc. "Maybe add a CSS rule."8 -
So I finished my personal website. It works fine on every browser... Except IE. All JS functions pass the compatibility check and I don't get any errors. Great.6
-
I met this girl and told her, she's the global variable to all my functions.. She gave me a dirty slap5
-
I'm reviewing a PR and it's easy to detect which functions were created with an AI: the ones that have comments.4
-
when you release an update and everyone starts to see problems with functions you didn't even touch3
-
I wrote code yesterday, that functions the way it is supposed to.
I do not understand my code today.7 -
No a rant : today one of the top senior told me he liked one of my functions. Thank you so much sensei!1
-
Exactly, this meme is so relatable!
I was working with MPAndroidChart (Charting Lib), most of the working functions are deprecated! And new ones are not working -
I hate social functions.
Have to shave of my months long beard and dress up like a gentleman, too much effort imo.5 -
Have you ever been at that desperate point where you start naming your variable and functions into something like "pleaseWork"4
-
Giving functions exciting names so you can feel like a Bond villain while programming:
execute(); destroy(); fire(); isDead();6 -
!rant && Announcement
I am working on a DEVRANT TOOLBOX for the Firefox Desktop Browser.
It includes a dark mode and some new functions (autoreload, colored notifs, image preview on mouseover).
The Alpha version is finished.
As a first step I created an experimental version just for the dark mode (no other functions).
Its alpha and experimental, so I will not not published it.
I need some testers for it. My email is temporary available in my users profile for that.16 -
!rant
Best day of my life ❤️.
Arrow functions will be added to PHP 7.4:
https://twitter.com/nikita_ppv/...22 -
C# FTW! New features for C#7.0:
blogs.msdn.microsoft.com/dotnet/2016/08/24/whats-new-in-csharp-7-0/
tuples, pattern matching, local functions *coder-gasm*6 -
Python tip: some python functions have **kwarts (key-word) arguments, that means you can construct your parameter dictionary like so:
kwargs = { 'a':1, 'b':2}
And pass those arguments like so:
function(**kwargs)8 -
I use an MVC based framework mostly aaaand I'm very fucking lazy sometimes soooo I just run the db functions in the view very often yeah just because lazy really 😄4
-
I'm taking a unit at my university called 'simulation and modeling'. Today was the first class and the professor was talking about random number generators.
Professor: Every language has a function to generate...Every good(emphasis on good) language has a function to generate a random number... Oh well even php does...
😂😂😂😂I'm already in love with the unit...5 -
Good guy teacher doesn't care if you write Javascript global functions wrong on a test because "your editor will fix that for you"
-
My programming teacher told me we need to solve problems using functions. Theoretically, main is a function .-.6
-
Today on our CS class we worked in Excel. We had to do some functions and stuff and my classmate said:"Can i use my calculator?".5
-
Client dev inlined all my single line functions as it's "more efficient".
Speechless is not the word.14 -
A co-worker doesn't like to use async/await operators, so he's always changing the code to use promises and callbacks and apparently async functions whitout awaits...1
-
JavaScript.
So terrible language in so many ways, the code is a absolute mess, the shit of the callback hell of functions inside functions inside functions.
And now everything it's built around the tucking JavaScript, you have to learn it by force because there is almost no project that doesn't use it.
I know it has some benefits and because that is getting bigger but the syntax is the worst shit ever, I mean, switching from Python to JavaScript is a pain.
The only good thing is it's getting better with each ES iteration, but it is still a really big piece of crap with hundreds of frameworks.13 -
I added functions to create and delete categories on my cms project :) Its starting to come around.1
-
When forced to make something in Access and VBA, the only motivation I find is naming the functions by my choice!2
-
> MISTER IHATEFORALIVING, YOU CAN'T CREATE YOUR FUNCTIONS! YOU MUST USE WHAT WE ALREADY HAVE, OTHERWISE WE FILL OUR CODEBASE WITH USELESS FUNCTIONS!
The very much useful functions in our codebase:11 -
One of my favourite things in JS is the absolutely cursed shit that it lets me do.
Did you know that you can return anonymous classes from functions?17 -
I always thought callback functions are some mysterious things that high end devs understand. After learning it I feel to stupid now. 😭3
-
Storing DB credentials in a repo that were encrypted using functions... that are in the same repo (both encrypt and decrypt!)...2
-
I'm a php developer.
I don't like preg functions (regular expressions) and i don't remember exactly the syntax for alternate words.
I googled, and this is what I found.
An heart attack.5 -
Some old tech: exists and functions just fine for 20+ years.
Some tech bro: Yeah we gotta throw this out the window and re-invent the freaking wheel.13 -
!rant
I figured out a way to make your code readable!
The main idea: make everything into a function. Each function should be small and you should gradually use past functions to build future functions.
Depending on the language and the size of your code you should make your functions with different sizes, but always keep them small.
This function splitting allows for debugging small parts of your code, avoids repetition and abstracts your code, each making it more readable.13 -
After years of my own dodgy javascript codes, I've started to throw away everything I know about javascript and learn it from scratch.
Learning that functions are objects really helped in restructuring a pile of my code. Eg passing it as a parameter to be executed.
Suddenly callback functions make a lot of sense now, and I've got a new found respect for the language. -
I really do wonder at what point the previous developer on this project thought 800 line functions are totally reasonable and standard practice...7
-
I just love languages and functions that support using a negative int to access array from the end! Awesome.5
-
The whole javascript / java thing (which i suppose is an easy mistake to make to the uninitiated ).
The bright side is, it functions as a good litmus test.3 -
I was just chatting with my dad. He used to be mostly a C# dev but changed jobs and is now doing mostly Java. He says he likes it better.... Because it doesn't have lambdas/anonymous functions.
Uh.... Java was the first and only language where you can define interface implementations in-line (aka a whole bunch of functions)...
And 1.8 supports lambdas for Interfaces that have a single function...
I bet he'll hate JS... Where functions are can be passed around like objects, ES6 now supports lambdas and await, async... and anonymous functions (apparently they're called arrow functions?)9 -
So I just found out about arrow functions thanks to React and I've been sitting here for legit 20 min, amazed by how aesthetic they look6
-
My last boss insisted on using tables instead of divs and then asked me to make it responsive (every damn time). Also, functions that were over 10k of lines.4
-
So.. Someone proposed replacing all huge functions with apis and then using them internally in our own code.
Accessible over http..1 -
!rant
It feels so amazing to be able to divide a big ass method into multiple smaller ones that sometimes are even pure functions. <3 -
One of our most essential functions was giving a weird warning: C4706. Turns out that one of our team member wrote if(count =! 0)... Yes, he's new here
-
While studying business information technology (useless btw), we had to take these exams with Microsoft Office programs.
When it was time for Excel exam, we were given this sheet of instructions on what to do, and it even listed the exact functions you had to use.
The fun started when I realized that my Windows installation was in English, so my Excel installation was also in English. The instruction sheet and the functions listed in it were in my native language.
Because Excel is probably the shittiest thing ever made, this is the part where you know you are fucked. The functions listed in the instructions don't even exist in the English version (same goes vice versa btw), so what can you do?
You implement the fucking functions. Never used VB before that day, and never will again.
But I got a perfect score.2 -
I never understood why some developers _ before their Javascript variable or functions. Do they serve any purposes? Other they just make everything look bizarre12
-
There was this guy at my college who wrote his whole C project without any kind of functions, just 500 lines inside the main function. Obviously he failed.
#mastersOfCode1 -
SINGLE
RESPONSIBILITY
FUNCTIONS
HOLY GARBAGE UNTESTABLE DIFFICULT TO DEBUG JFC SHIT.
FUNCTIONS DO ONE THING AND DO ONE THING WELL. LEARN IT, LIVE IT, LOVE IT, OR JUMP INTO A LAKE
that is all.5 -
Before i found out about unit tests i'd create a console application where i'd test the functions
Good times -
Those much extension functions in Kotlin...
Just tries a lot combinations and got reminded of the "Let it go"-Song4 -
The difference between procedures and functions never troubled me. Until it did and now I'm just thinking it for the past hour! Here it is: Procedures perform some logic while functions (like in math) return a value. Daaaamn!4
-
Fuck backward compatibility
Because IOS 9 and Android 4.4 doesn't support arrow functions, I have to refactor almost 90% of the code4 -
1.)Not defining functions and writing the entire code everytime needed.
2.) Initialising objects if classes and using them only for next 2 lines and then destroying them. -
My programming teacher is explaining functions in C++ as if they were rocket science... Complicating things when they're easy5
-
Hey everyone!
Today I learned that true is not boolean and my functions typed for bool can actually return bool OR true!3 -
Passing variables by reference in nested functions using PHP.
If you miss an ampersand your afternoon is very long.
😝😝😝😝😝4 -
There are few developer who name their functions all wrong, but the functionality is fine. Then there comes those who name their functions right but the functionality is nothing close to what it says. There is this function I debugged. It's name is optimizeQuery. It does not optimize the query at all. Rather dismantles it. Also it made it's way to the production. 😅 Now I have to correct and optimize the optimizeQuery.4
-
Okay but
A js library with the exact same api as jquery, only using native js functions so developers can simply swap out the jquery file8 -
i cant believe i actually spent 6 fucking hours trying to write the implementations for string functions and trying to consider having null parameters ehwndbwksbdk wtffff is happening2
-
2am. All the things around me are alive. THEYRE ALL FUCKING ALIVE YOU MOTHERFUCKERS THEY ALL HAVE SOULS THEY PERFORM FUNCTIONS THEY ARE ALIVE17
-
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
-
* me: we need a timeout here because this thread could leak.
* pm: I guess timeout is not needed because there are no functions which will run endless
* me: hold my beer1 -
Don't you just hate it when someone says import the library to use the pre defined functions and
Your coding under C -
Me: I'm quite good at C programming language
Also me: Checks man page for library functions' information6 -
The mobile web browser is 80% done. I've pretty much added all the basic functions. I'm open for suggestions as usual.4
-
When you generate code to generate code (boilerplate classes and functions) you realize you're talking it a little too far 😄9
-
"Instead of writing classes in Python, create packages and use functions. Each function should do exactly one thing without being specific to the program you are developing." - Steve Waweru
-
When engineers get so CS-driven they can’t see simple things 🙃
Another manager messaged me and my boss last night to ask whether he’ll have to expose a certain function to be available in objective c classes (we’re iOS devs and most of our code is in swift, but some older stuff is still in .m files). He said he dug into the lower level code and didn’t see any connections or exposures so he assumes he’ll have to add these. My boss concurred and told him to go ahead and make them available.
Then I showed up with my didn’t go to university brain & searched the codebase for calls to that function from .m classes. There were like a hundred lol, working just fine. It’s already exposed. Neither of them thought to do that.2 -
Tell me what you want but ChatGPT is the best dev companion ever.
I've just submitted 700 lines of JS code with various complex functions because I had an issue for some specific cases I couldn't identify.
In less that a second ChatGPT noticed a missed argument in one of the many function calls... mind blowing.
It's something I would otherwise notice after hours of debugging, looking for a needle in huge functions.9 -
I dream about discovering weird side effects on certain built-in functions way too often.
I usually implement those myself but without side effects. All in the dream. -
What do you think about class-based OOP vs. Prototype-based OOP?
I think that class-based OOP is an unnecessary abstraction of structs, functions and global variables most of the time.16 -
I was ranting about overusing classes on python, then I noticed I'm a person that creates new functions for 2-3 lines of codes for no reason..3
-
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
-
I'm testing that functions in a service I made are accessible to activities that bind to it and this is what I call to ensure that5
-
"I don't think we should be playing with our privates {variables} like that" - framework designer
= context =
It was noticed that we have too many setter functions to change private variables just to do unit tests. So we had a small meeting to discuss what to do about this.
Options:
- don't do the test
- ignore till another time (ie: keep the functions till its a problem)
- put the variables into a provider
- use reflection (the above quote was a reaction to this option)6 -
Wrote a set of beautiful Swift functions. Runs Xcode, nothing. Checks code...looks good...clean build, delete app, re-install, rebuild...nothing. Checks documentation, watches three videos, re-writes code...nothing. Stares at screen for an hour...realizes I never actually called the functions. Closes laptop, checks self into pysch ward.3
-
Modifying Microsoft Windows with bunch of undocumented functions.....
And integrating CZenter to it.....
^v^ -
Sometimes when I’m drunk, I create functions in my head for things like default answers and stuff..3
-
Yo dawg, I heard you like writing code for code you already wrote. So I made you write some mock functions so you can write code for code you already wrote!2
-
'Undefined' is not a function
that moment at work when your boss asks you do something that has not been defined as your 'function' -
USING FUNCTIONS MMAKES MY CODE EASER TO READ BUT FOR THE SAKE OF EVREYTHING IBM AND LINUX DOING NETWORKING FUNCTIONS WITH MORE THAN ONE JOB FEELS LIKE RIPPING YOUR TOENAILS OFF!2
-
Only four things are infinite , The universe, Human stupidity, The no. of functions and properties in CSS and JS, AND WINRAR's TRIAL PERIOD......11
-
Callback your functions, not your ex.
Hash is for your data, not you,
Query tables, not your loved ones. -
Super inconsistent function naming in PHP.
And how some things are object-oriented and some are functions.3 -
just a reminder
if you think your 500 line python script with garbage hardcode values everywhere that brittly functions even for you is going to bring you thousands in subscriptions
fuck you7 -
Currently doing algebra to work out which of 2 slightly different functions is wrong and all this tells me is that both are crap.1
-
Sometimes I start to write codes and I even don't know how it's going to be end.
I just hope I find it along the way. 🙃2 -
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 -
Until about two weeks ago I thought serverless functions looked like this:
api.example.com/Cart.addToCart('product-1234', 1)
Turns out they're just normal API endpoints1 -
Calculus sucks. My proffessor is good, but I have no idea how to Differentiate functions.
My CoSc class is much funner7 -
*array* in php. As soon as the word "array" is in it's name it's argument order, type and return value are just fucken luck.1
-
Screw some PHP builtin functions, why does imagecreatefrompng require a quality modifier between 0 and 9 and imagecreatefromjpeg one from 0 to 100, makes no sense!2
-
Develop a facebook canvas app with share to Twitter, LinkedIn, pinterest, reddit, Google+ functions...1
-
Playing with Haskell and almost pulling my hair out. Some thing works, switch place of a call and I get weird errors. Baaaaaah1
-
On the kernel/os project I'm working on with @SoldierOfCode.
It's a side project but I *need* to refactor the normal text based functions to vga graphics compatibility.3 -
When you first start programming:
"I know how all of these functions work, now what can I actually use that for?.." -
Starting to get into intricacies of javascript.
Question was: when and why do you bind your functions?
Farking hell, no wonder people bitch about javascript.3 -
How many of you feel functions API in Java8 should have support wiring up a Function and a Consumer :/
-
fuck this shit
who deployes 200 lines of js lambda functions with Zero comments or description
also they using variables not even initilized
it feels like some1 just c/p GPT code6 -
Do you prefer to negate a positive function or write a negative one?
Example
!IsValid() vs IsInvalid()6 -
When you have to work with functions clearly no one gives a fuck about... because who needs documentation... like... 2 decades later!? Oh yeah sure it might change tomorrow...2
-
Quick question...
Can you guys code without any reference?
I find very hard to memorize all the functions and etc...4 -
When angular developer is trying to explain the difference between the directive ngClick and ngSubmit.
NGClick allow you to execute custom functions when an element us clicked. NgSubmit, do the same thing but it's different.2 -
Small rant because I’m new here, but…I hate async functions in JavaScript.
Especially when dealing with an API.14 -
I wrote like 6 or 7 functions today and havent built the project before leaving so if they all work on monday im deadass gonna do a fortnite dance
-
I saw one of my coworkers do a multi step bus ticket purchase in one file (we use angular 4) instead of using components he just hide and show the sections, resulting in a class that have about 2000 lines of code, unused variables, unused functions o just functions that console.log something, and many many lines of declaring variables. I tried to fix that, but this crazy deadlines were fucking with me3
-
Today is the fourth time in my career I needed a function that oscillates... to animate a 3D model slowly rotating left and right for my personal project.
Yay for the sine and cosine functions :D
...I never used them outside working with (mostly 3D) stuff that has to animate in a loop8 -
is not my fav lang
but i work with it every day
php's preg_match and preg_replace functions
i have the perversion to manipulate strings -
When I code in Qt Creator, and a function get to be more than 950 lines of code, autocomplete/autoformatting stops working.
I feel like Qt Creator is judging me...2 -
My mentor to me when I joined the job fresh out of college (in a somewhat dramatic tone, which is why I remember it so vividly):
"Gone are the days when you wrote programs with a small number of big functions, and lots of comments. Write code which is easy to read by humans - small functions which do 1 thing and are named after the 1 thing it does."
TL,DR: well named modular code. -
So basically after using arrow functions for 6 months I discovered just now that it also passes it's enclosing scope. The more you know7
-
That moment where this.prop wasn't defined when you know it should be, and then you realize you got trigger-happy with arrow functions. :P
-
I got the logic for the time off rules wrong .. or rather the people who wrote this didn't bother to have the functions make sense. There's an `effective()` function .. which also includes all the holidays for previous years (how the hell are they still effective?!).
I'll just ask in the time-off room ... oh look ... no one has posted any chats in here for months. It's all just log messages. I bet everyone has it muted.
I hate working on this shit.2 -
Advice to new devs: always check function return values. Crash as close to the reason as possible. Make your functions return errors whenever appropriate and check these as well, crashing gracefully.1
-
Spent an hour today deciding if something in my framework should be called functions or methods... Decided on methods and had to rewrite half of my documentation.... Productive day...
-
Your one-line JavaScript arrow functions AREN'T LEGIBLE! You've just memorized their shape. It's OK. But don't lie to yourself. They look super stupid. They aren't for humans.14
-
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. -
I've been wondering about the difficulties and security risk of allowing web apps to interact with native functions, such as file management. What would be the difference of letting web apps access native functions, and native apps doing it? I mean, we can already request access to features such as camera and microphone?
-
I miss functions that do stuff.
Just a simple logic piece that does the stuff it wants to do. Without classes, objects, interfaces, frameworks or configurations.
I mean, yes, wrapping the functions behind the implementation of an indifferent interface is usually a good call.. As long as it stays simple.
But it rarely does, doesn't it?5 -
When you go to create a function only to discover that you have already created that function with the same name you just thought of.... Am I in the matrix? 😯1
-
Anyone else here who really enjoys writing pure functions or domain classes?
It's so amazing to be able to write dependency-less classes that have such simple, elegant logic and sometimes just a bunch of getters and setters. Pure functions with type hints are also one of my favorites.1 -
A lecturer for an Embedded Systems module who gave out drivers for an LCD display with no documentation at all, and about 4 functions for writing to the display and 3 initialisation functions, spent ages trying to actually decide what each function did by which memory addresses it was changing and how (made even better by the fact a good bit of the functions were written in Assembly since it was Embedded C)🙃
-
Our informatics practical instructor's logic:
Put everything inside functions :D
Sure that'll help xD1 -
Code::Blocks, because why make it look nice, bother having any auto-complete functions, actually ensuring all of the built in C++ functions work and not having the need to sometimes have to be closed down and restarted to build and run the code 😤1
-
I bought a Mi Band 3 4 days ago and I already modified the firmware. I hate when the manufacturer limit functions of software when the hardware it's very capable.6
-
Started working for a new company as a data lead, created a couple of basic lambda functions for a pipeline... 5 approvals and three weeks later the functions haven't even been pushed to UAT (which I'm not allowed access to).. Have I been lucky before or is this dysfunctional..?
-
Anyone here use generator functions in JS? Seems like it could be useful but whenever I explore the possibility of using one, I usually end up going another route9
-
Every time I see posts about api's changing I wonder if none of those companies uses api versions, or simply deprecate functions before removing them...1
-
#get unique images ids
images_ids = np.unique(images_df.index)
Dear developer who wrote the code I'm looking at,
thanks, I really need comments like this one. I was wandering lost in 1500 lines of code, looking for an explaination of what the actual fuck the code is doing, and there I see you, comment. It's not like I want to know what the hundreds of lines functions do, who cares about that. What I needed to know, what shed light on this dark forest, is what the numpy functions do, because as you certainly know dear developer, such functions are really hard to comprehend, lacking of documentation.
Thanks.2 -
I got my circular buffer working for my oscope display I am working on for audio data.
https://github.com/Demolishun/...
I plan on expanding this to have more functions for bulk operations. I also want my fake iterators to be able to be used with <algorithm> functions.
It was pretty awesome last night to finally get to see my audio waveforms displaying properly.1 -
To know the most efficient datatypes, functions, etc, and syntax for whichever language and framework I'm currently using.
-
"I'm using a really long switch, because I'm old-school and just use what I know, because I don't have time to look up fancy functions like str_pad"
-
I do write a functions class for most used functions or methods but, some how end up copying some of those on every page.
-
Scala lang is hard to learn(not saying that sucks), but first I don't want to learn this language, I just wanted to use some functions for a hobby project and this project I found on internet had all I need so I just wanted to translate it to Python, using an online Scala compiler I pasted the functions I needed anddddd error can't compile it it, because the functions had some extra things that were not part in the file where functions were, these things check for null values(?) so I was looking into the project where these "keywords" comes from and I can't find it, so after some grep in the project files I found the "keyword" I was able to compile it, also I weird thing about this language is that there is no return keyword
So yes I find this lang not that intuitive (for me at least)4 -
hey frontend devs,
i got a qweshtiun:
how come half of yous communicate in wordsalad?
also: ur methods are functions and ur objects are structures. wth is it all about?13 -
Q: Does JS allow you to write functions to return functions?
A: Yes it does.
Doesn't mean you should do this. What's wrong with you?9 -
Oh yeah Google why don't you just change the parameter order of functions, remove entire functions between minor versions, and not put a single example on your API docs? And force devs to add 30 lines of boilerplate and start an http server so I can run the debugger? Fuck tensor flow, I'm moving to pytorch.2
-
!rant
Just learned that Kotlin has extension properties to go along with its extension functions. Anything else I'm missing?1 -
I'm just beginning to learn about Javascript, and I'm not sure if I like the fact that variables, declared outside of functions, become global. How do other people feel about it?6
-
Python having very limited lambdas, I mean, I understand WHY they are how they are, I just miss true anonymous functions.
-
Hi guys
Can we still install and use php 5.2 or php 5.3?
Got an old website that needs rescue
Coz of the depricated mysql functions
Much appreciated
Cheers5 -
spent 1 hour trying to get a function working.. realized I needed just 1 line of code instead :/
new Rant("FML") -
What is everyone's preferred formatting for functions/if statements. Does the first curly brace go on the same line or a new line?
function 1() {
}
or
function 2()
{
}14 -
You babble about pure functions but your intellectual peak was when you reinvented “the stranger”.2
-
Either I am dumb or the usage of p5.js functions makes it either hard or impossible to test with jest. Constructor properties are thrown away (which I need) and all methods are mocked, if I automock, or I've got the pleasure to mock everything inside the class. Otherwise of course jest complains that p5's color() isn't defined. And mocking everything manually is not safe in case of class changes.
Of course p5's tdd tutorial isn't helping, as it seems to mock everything.
I need like a pro/mentor or smth for this... -
I always see complaints of missing semicolons. But personally I always forget the parentheses for my void functions doh;
-
Math.abs(x) I use this a lot, along with all trigonometry functions, which I love and am also glad they are implemented2
-
This one time, at band camp. I seen this wait function named "wait_for_no_reason". Now I wonder how many actual wait functions are really necessary.2
-
What are some of the least documented Open Source Software?
Let me start:
1. VLC
only has Doxygen, and most functions are not documented properly, with poor response from the forum -
If you write comments for your functions (you should) do not use param names as param description! This is fucking useless.5
-
what kind of sorcery is this? how am i suppose to call this class( or whatever it is)'s functions?4
-
Peoples saying that JQuery dies after Document.querySelector is gone, but, write the functions like `slideUp` or anything that manipulates styles too, is very non-productive.
Do you know another lib (small) that makes these functions created by JQuery?15 -
Making classes and functions without commenting what I expect each class and function to do. Which means that my classes and functions have really long names.
Example Code:
Class ReallySpecificClassToWorkWithThisFramework { ...
public void DoThisActionInTheFramework (obj TheKeyToTheWholeFunction) { ... }
} -
I've reached the point where I write my Google sheets functions in the same IDE as my other programming, because it handles errors better...2
-
Top Tip: When writing 200 line functions why not have a string variable named 'tmp' that changes it's value multiple times throughout?2
-
Newbie advice:
Break large problems into smaller problems then use the smaller problems to name tour functions/methods -
Am I the only one that in order to keep C code clean has a horrible file with macros and util functions?4
-
Inherited a project with random include '*.php' and mysql_* functions littered everywhere, this will be fun 😀😂😐😔😞😭
-
MAUI shell is killing me.
Maybe it was a bad choice to choose MAUI at this point.
Shell functions Don't have docs,
Only one page on Microsoft docs,
And the functions Don't even do what the Microsoft docs says they do.
And they throw errors without any information or reason.20 -
So functional programming is basically using prebuilt libraries anf functions and not write a single line of logic?3
-
TFW 'this' in functions loses its context when in promise chains and none of the blogs mentioned it :^)1
-
Functions with all Get/Post data as parameters like this
public function qwerty($params)
{
return $params['item']['price'][0]* 2;
} -
What are exemples of underused data types that you wish we used more often?
Using Set or Map or WeakMap instead of the normal Object+handmade dirty functions (JavaScript), for exemples?1 -
Trying to read the description/usage for WP functions to figure out what's going on is like getting lost inside a maze...inside a maze.
I swear people write these descriptions for people who already know what the functions are and what they do. #UselessToMe -
Fun fact about JavaScript: it's a... bit inconsistent. For example, functions like Array.map, Array.reduce, Array.sort don't mutate the array, but Array.unshift does, and returns array's length after the element was added.5
-
I hate js, but I hate more coffeescript and his arrow -> and fat arrow => to give context to functions7
-
I love serverless functions but I'm so tired of complex orchestration, juggling event parameters and now scipy+numpy+pandas exceeds size limit of 250MB..
Feel like cramming it all in a monolith like the geezers of yore and be done with it3 -
Do you put Caps to public variable ?
My IDE was doing caps to public variable but someone told me that he was wrong it's not caps for public variable only functions.9 -
When your project manager/tester keeps changing different fields required, which is being handled 100% with JQuery....requiring you to rewrite the entire functions logic
This has now happened 4 times... -
Why are some js functions used with a window. prefix?
I mean I kinda get it when you want to addEventListener on the window but...
Why do people use window.setInterval?2 -
Newbie in Python here. Blank 0 newbie. Now, the question for the relatives.
What is the core object of Python when talking to objects, functions, and relationships between those last.2 -
The difference in arrow function and traditional function? Yes. What? This is the difference. What?4
-
Learning ES6 arrow functions from Kyle Simpson's workshop video. Amazing how something that was designed to be a syntactic sugar turned out to be a code readability nightmare :(1
-
In JS/Node, is there a performance and memory cost to nested functions?
I.e.
function handle(req, res)
{
var x = 5, y = 10;
function add() { return x + y; }
function multi() { return x*y; }
res.send(add() + multi());
}
As opposed to taking out the 2 functions and making them accept x,y as parameters.6 -
Dear JavaScript users,
Do you use ES6 or ES5 syntax for creating a class and adding helper functions? Node can't decypher ES6 so unsure what to do.9 -
It's time to reconcile the religious war with a compromise: How about we use spaces for lines with indent <= 8 chars and tabs for deeper indents?
Or maybe tabs in all functions returning strings and spaces in all other functions?2 -
I'm I the only programmer who writes functions and queries?.. Most of my tasks revolve around that ,I'm a back-end guy 😂 😂3
-
you should be able to use a dropdown to select functions and member names like in visual studio in vs code while editing javascript :*(12
-
I once wrote a whole lot of classes with lots of functions and pushed them to the live server without testing... There were no errors 😎1
-
I feel like I didn't do this right and I'm a tad confused as to what they mean when they say that the function should look like this when you call it:
let line = openingLine(verb: "row", noun: "boat")
Is my solution correct?10 -
Oops, it seems I am ”in the flow” already.... dreamt about the right way to write functions to fix a bug. Wake up to ”functions” in mind in a romantic way 🌚
-
Azure Functions has become a Joke? Does anyone use it here? It keeps on stopping for me and I have to change runtime version to get it up?7
-
I can't google jargon, what do you call it when you "flip" a function call, such that the call becomes an event in some dispatch system and return becomes a call on the event? I had to implement five such APIs this week with surface level differences and I'm starting to feel like it has to have a name if it's this popular.
For the pedantic, I mean async calls in JS in particular, I know you can't just invert a synchronous function call that uses a stack without peek.5 -
Does one of you guys know a php package which provides a thin wrapper around the curl functions?
Especially the functions for multiple parallel requests in different threads.
The only implementation I know about is kriswallsmith/buzzbrowser -
It's not an exactly habit, it's a error that I sometimes do. Type 'funtion' when I defining a function. Then the console logs an error and I cannot identify what and where is the error in the code. After search 1/2 hour, I realize, and then I feel a pathetic dev :'v1
-
Why are there so many template languages? Do people enjoy them? I certainly don't.
What is the problem with just using functions? E.g. using https://j2html.com/ or http://www.lihaoyi.com/scalatags/
You can do code reuse with functions, for-loops, classes, interfaces etc.
Why are they avoided in Spring, PlayFramework and similar? -
I don't understand why people take some shots on their codes using their mobile phones, do they don't have screen capture functions on their computer? lmao1
-
perl -MCPAN -e 'shell;'
install DateTime
Proceeds to install a shit ton of dependencies, takes two hours to install.
WHY? Does math functions related to date/times require all those deps?4 -
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 -
Friend asked me to help him with his excel file, as I know a bunch of that, it was just a small and quick thing he said, I just can't get this function to work...
Now I've rewritten all of that excel files functions and, without error handling and anomaly processing every function is an average of 500 chars. Times 500 unique functions...
QUICK AND EASY YOU SAID -
Why shall I convert my utility functions into arrow functions?? I really don't see the point.
I think it is way more descriptive to read a line going
"export function buildEntity(){"
Instead of
"export const buildEntity = () => {"
When are you using arrow functions? Do you see any benefits there?12 -
what's the best practice to divide long task into functions? suppose I have function of 200+ lines then from the code readability point doing short functions would be better?3
-
Is ECMAScript a dialect of Lisp?
"JavaScript has much in common with Scheme. It is a dynamic language. It has a flexible datatype (arrays) that can easily simulate s-expressions. And most importantly, functions are lambdas. Because of this deep similarity, all the functions in [recursive programming primer] 'The Little Schemer' can be written in JavaScript."
— Douglas Crockford
An interesting discussion on SO (https://stackoverflow.com/questions...)2 -
As a person trying to learn C, I am sick and tired of the lack of visuals for C functions. As a person who best learns by visualization, I find it rather difficult to learn the difference between functions such as malloc, calloc and memset. All I can find on Google is the same written documentations.
-
When I copy some lines of my source code into other functions but getting desperated when compiler says something like "...'Double' but 'Array' was expected" because I forgot to change the value for the functions.
-
> pass optimization flags to the compiler for inlining small functions even in debug builds
> runtime performance is over 4 times worse
Ah, it's that kind of Friday -
What do you Guys recommend for automate self testing functions on a node Server? Grunt, Mocha or Chai and why?
-
Firebase local emulator decides to just break for no reason. All of a sudden all requests are unauthorized (even though I haven't changed anything in the authentication process of my app).
W H Y
Yay, I just need to debug for 5 hours and then the thing is going to fix itself without any explanation. -
I created a few helper functions in bash sometime ago, maybe someone might find it useful
https://github.com/zombieleet/...