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 - "nil"
-
If programming languages where weapons...
1. C is an M1 Garand standard issue rifle, old but reliable.
2. C++ is a set of nunchuks, powerful and impressive when wielded but takes many years of pain to master and often you probably wish you were using something else.
3. Perl is a molotov cocktail, it was probably useful once, but few people use it
4. Java is a belt fed 240G automatic weapon where sometimes the belt has rounds, sometimes it doesn’t, and when it doesn’t during firing you get an NullPointerException, the gun explodes and you die.
5. Scala is a variant of the 240G Java, except the training manual is written in an incomprehensible dialect which many suspect is just gibberish.
6. JavaScript is a sword without a hilt.
7. Go is the custom made “if err != nil” starter pistol and after each shot you must check to make sure it actually shot. Also it shoots tabs instead of blanks.
8. Rust is a 3d printed gun. It may work some day.
9. bash is a cursed hammer, when wielded everything looks like a nail, especially your thumb.
10. Python is the “v2/v3” double barrel shotgun, only one barrel will shoot at a time, and you never end up shooting the recommended one. Also I probably should have used a line tool to draw that.
11. Ruby is a ruby encrusted sword, it is usually only used because of how shiny it is.
12. PHP is a hose, you usually plug one end into a car exhaust, and the other you stick in through a window and then you sit in the car and turn the engine on.
13. Mathematica is a low earth orbit projectile cannon, it could probably do amazing things if only anyone could actually afford one.
14. C# is a powerful laser rifle strapped to a donkey, when taken off the donkey the laser doesn’t seem to work as well.
15. Prolog is an AI weapon, you tell it what to do, which it does but then it also builds some terminators to go back in time and kill your mom
All credits go to Vicky from damnet.com5 -
When Zuckerberg says "Move fast and break things", it's "innovative" and he is an "entrepreneur", but when I "move fast and break things" it's "reckless driving" and I'm "causing car accidents"...6
-
I had to open the desktop app to write this because I could never write a rant this long on the app.
This will be a well-informed rebuttal to the "arrays start at 1 in Lua" complaint. If you have ever said or thought that, I guarantee you will learn a lot from this rant and probably enjoy it quite a bit as well.
Just a tiny bit of background information on me: I have a very intimate understanding of Lua and its c API. I have used this language for years and love it dearly.
[START RANT]
"arrays start at 1 in Lua" is factually incorrect because Lua does not have arrays. From their documentation, section 11.1 ("Arrays"), "We implement arrays in Lua simply by indexing tables with integers."
From chapter 2 of the Lua docs, we know there are only 8 types of data in Lua: nil, boolean, number, string, userdata, function, thread, and table
The only unfamiliar thing here might be userdata. "A userdatum offers a raw memory area with no predefined operations in Lua" (section 26.1). Essentially, it's for the API to interact with Lua scripts. The point is, this isn't a fancy term for array.
The misinformation comes from the table type. Let's first explore, at a low level, what an array is. An array, in programming, is a collection of data items all in a line in memory (The OS may not actually put them in a line, but they act as if they are). In most syntaxes, you access an array element similar to:
array[index]
Let's look at c, so we have some solid reference. "array" would be the name of the array, but what it really does is keep track of the starting location in memory of the array. Memory in computers acts like a number. In a very basic sense, the first sector of your RAM is memory location (referred to as an address) 0. "array" would be, for example, address 543745. This is where your data starts. Arrays can only be made up of one type, this is so that each element in that array is EXACTLY the same size. So, this is how indexing an array works. If you know where your array starts, and you know how large each element is, you can find the 6th element by starting at the start of they array and adding 6 times the size of the data in that array.
Tables are incredibly different. The elements of a table are NOT in a line in memory; they're all over the place depending on when you created them (and a lot of other things). Therefore, an array-style index is useless, because you cannot apply the above formula. In the case of a table, you need to perform a lookup: search through all of the elements in the table to find the right one. In Lua, you can do:
a = {1, 5, 9};
a["hello_world"] = "whatever";
a is a table with the length of 4 (the 4th element is "hello_world" with value "whatever"), but a[4] is nil because even though there are 4 items in the table, it looks for something "named" 4, not the 4th element of the table.
This is the difference between indexing and lookups. But you may say,
"Algo! If I do this:
a = {"first", "second", "third"};
print(a[1]);
...then "first" appears in my console!"
Yes, that's correct, in terms of computer science. Lua, because it is a nice language, makes keys in tables optional by automatically giving them an integer value key. This starts at 1. Why? Lets look at that formula for arrays again:
Given array "arr", size of data type "sz", and index "i", find the desired element ("el"):
el = arr + (sz * i)
This NEEDS to start at 0 and not 1 because otherwise, "sz" would always be added to the start address of the array and the first element would ALWAYS be skipped. But in tables, this is not the case, because tables do not have a defined data type size, and this formula is never used. This is why actual arrays are incredibly performant no matter the size, and the larger a table gets, the slower it is.
That felt good to get off my chest. Yes, Lua could start the auto-key at 0, but that might confuse people into thinking tables are arrays... well, I guess there's no avoiding that either way.13 -
I have a friend that is a girl that loves to snapchat everything she does, the problem is that she now works (in apprenticeship) at a huge company and she snapchats her desktop who has a lots of post-it notes and her screen which is showing excel spreadsheets with customers data and stuff...
And she does this on a regular basis btw
Who can be possibly that dumb...5 -
Wtf, really??? Are they trying to liyerally KILL ME????
Got home from hospital today wth my family. Baby got sick. Wife also caught cold... Bad news. It was just me still healthy like a raddish [we have such saying].
So I got home. Started feeling somewhat funny. Sore thighs, feeling nauseaus, chilly, a bit dizzy.
10 minutes later I'm fucking trembling! It felt as of I was kicked put bare ass to -20C outside! I'm not exaggerating [probably made some typos.. Pls correct me] - i live where winters get like -35C. Everything around got like twice darker. And my lower teeth got itchy af [NOT the best feeling, trust me].
I must have caught cold too - I thought to myself, cuz I know what these sympthoms mean. I always have 'em all when I have fever. Since shivers are caused by rising fever I got my Microlife remote thermometer out of my drawer. Click, blue light, wait, beeep. 36.5C. Allright.. Maybe I got it wrong... Try again -- same result. Wife also gave a couple tries - nada. Nil. Nullpointerexception. Healthy like a pickle!
10 minutes later I couldn't stand the cold. Got under my blankets wife made some soup, tea,... I still have this analog thermometer, the one with quicksilver. Pop it into my armpit - jusyt in case. 10minutes later I take it out. It says 39,5 and rising. Try the microlife again. 36,5. WHAT THE FUCK?????????
If I weren't so fond of old-school stuff I'd be in a fucking ER now!!
Fuck you medical digital equipment made to be used at home! FUCK YOU!!
I'm pissed.
Do you folks kbow where could I get those q-silver thermometers? Just in case. They're already out of matket in my area for quite some time... For being dangerous [i give 'em that, okay?] and.... Lisen to this.... "unreliable"!
FUCK IT!15 -
tl;dr: Bossmang blaming my code for a database connection issue thrown from outside of my code. Bossmang doesn’t listen. Bossmang doesn’t want to believe it’s a connection issue.
———
Bossmang: The code you wrote is causing insane spec failures in the release branch! It’s hard to follow because it’s so insane, but the cause is your code not properly handling undefined settings! Look at this! <spec>
Me: Specs pass on my machine. I ran it with both a set and nil value. <screenshots>
Bossmang: It works when you set it to nil.
Me: But a setting that doesn’t exist returns nil? <screenshot>
Bossmang: Not seeming to.... So this is the spec failure from the release: “No connection pool with id primary found. <stacktrace that starts outside of my code>”
Me: ... That’s a DB connection error. It’s also being thrown outside of my code, and from a `super` call to Rails.
Bossmang: But <unrelated> and <unrelated> and <other spec> is failing, and if I set the version, it has <other failure> instead! That calls your code first.
Me: It’s a database error. Also: <explains probable, unrelated cause of other failures, like someone didn’t mock a fucking external api call>
Bossmang: But if I restore a DB backup, it fails again.
Me: Restoring uses a dB connection, which could be exhausting the pool depending on the daemons you have running.
Bossmang: perhaps.
...
Bossmang: I still think it’s related to spec ordering.
🤦🏻♀️🤦🏻♀️🤦🏻♀️🤦🏻♀️🤦🏻♀️
This is tiring.12 -
ARGH. I wrote a long rant containing a bunch of gems from the codebase at @work, and lost it.
I'll summarize the few I remember.
First, the cliche:
if (x == true) { return true; } else { return false; };
Seriously written (more than once) by the "legendary" devs themselves.
Then, lots of typos in constants (and methods, and comments, and ...) like:
SMD_AGENT_SHCEDULE_XYZ = '5-year-old-typo'
and gems like:
def hot_garbage
magic = [nil, '']
magic = [0, nil] if something_something
success = other_method_that_returns_nothing(magic)
if success == true
return true # signal success
end
end
^ That one is from our glorious self-proclaimed leader / "engineering director" / the junior dev thundercunt on a power trip. Good stuff.
Next up are a few of my personal favorites:
Report.run_every 4.hours # Every 6 hours
Daemon.run_at_hour 6 # Daily at 8am
LANG_ENGLISH = :en
LANG_SPANISH = :sp # because fuck standards, right?
And for design decisions...
The code was supposed to support multiple currencies, but just disregards them and sets a hardcoded 'usd' instead -- and the system stores that string on literally hundreds of millions of records, often multiple times too (e.g. for payment, display fees, etc). and! AND! IT'S ALWAYS A FUCKING VARCHAR(255)! So a single payment record uses 768 bytes to store 'usd' 'usd' 'usd'
I'd mention the design decisions that led to the 35 second minimum pay API response time (often 55 sec), but i don't remember the details well enough.
Also:
The senior devs can get pretty much anything through code review. So can the dev accountants. and ... well, pretty much everyone else. Seriously, i have absolutely no idea how all of this shit managed to get published.
But speaking of code reviews: Some security holes are allowed through because (and i quote) "they already exist elsewhere in the codebase." You can't make this up.
Oh, and another!
In a feature that merges two user objects and all their data, there's a method to generate a unique ID. It concatenates 12 random numbers (one at a time, ofc) then checks the database to see if that id already exists. It tries this 20 times, and uses the first unique one... or falls through and uses its last attempt. This ofc leads to collisions, and those collisions are messy and require a db rollback to fix. gg. This was written by the "legendary" dev himself, replete with his signature single-letter variable names. I brought it up and he laughed it off, saying the collisions have been rare enough it doesn't really matter so he won't fix it.
Yep, it's garbage all the way down.16 -
!rant
!!pride
I tried finding a gem that would give me a nice, simple diff between two hashes, and also report any missing keys between them. (In an effort to reduce the ridiculous number of update api calls sent out at work.)
I found a few gems that give way too complicated diffs, and they're all several hundred lines long. One of them even writes the diff out in freaking html with colors and everything. it's crazy. Several of the simpler ones don't even support nesting, and another only diffs strings. I found a few possibly-okay choices, but their output is crazy long, and they are none too short, either.
Also, only a few of them support missing keys (since hashes in Ruby return `nil` by default for non-defined keys), which would lead to false negatives.
So... I wrote my own.
It supports diffing anything with anything else, and recurses into anything enumerable. It also supports missing keys/indexes, mixed n-level nesting, missing branches, nil vs "nil" with obvious output, comparing mixed types, empty objects, etc. Returns a simple [a,b] diff array for simple objects, or for nested objects: a flat hash with full paths (like "[key][subkey][12][sub-subkey]") as top-level keys and the diff arrays as values. Tiny output. Took 36 lines and a little over an hour.
I'm pretty happy with myself. 😁6 -
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 -
@dfox must be flexing some ad space. I’ve seen an influx of new users the past few days. Welcome to devRant everyone.8
-
Biggest annoyance in Ruby: nil is an object, nil's class is NilClass, NilClass's class is Class, Class's superclass's superclass is Object, and Object's superclass's superclass is basically BasicObject1
-
I've been sitting and staring at my code for two hours.
Actual work done - nil
This has been going on since three days now.
Tying not to panic. It has happened before. This phase should end in the next couple of days....
Don't panic please.
I don't think I'll be able to sleep tonight...3 -
Shit Developers say:
Fuck you Jasmine and your camelCase
I’ve been wrestling cucumbers all day
Oh no all the cucumbers are broken
In a fit of refactoring madness I have gone and changed a lot
Did you seriously just give ME nil?... No!
If the shit sticks, then we put nice paint on it
Fucking red dot motherfucker (Ben and his failing specs)
You know what we don’t do often..kill each others builds. Kill them and reschedule for later. Mwahaha ha ha.
This build is going to be so rad...(5mins later)...Ok this is not going to pass..I can feel it in my waters!
Can i do that in a digital way or do i have to move my meaty body downstairs to find him?
All the donkeys have be out the gate by sundown
God, imagine if you could patent mathematical solutions
actually, I wouldn't be surprised if you can in the states "no, you can't use a laplace transform, you haven't got the rights, you have to use a less accurate transform on your matrices"
ooooo a boolean that's phrased in the negative, my favourite for code review destruction!
Fuck the police i'll call the object here
Web RTC - its super easy, all you have to do is..probably some hard stuff
I want to go to that conference so I can start arguments with dickheads about semicolons. Just for fun.
This this is not the same as that this.
Can’t come to work I can’t find any clothes. It’s best for everyone if I just don’t come in. ...2 hours later... Yeah my clothes were just in the other room and i couldn’t be fucked moving
(OH about bad bug reports) - you know when they are all like oh joogly joogly doesn’t doodle doodle and it should wobbly doodle you know? and im all like fuck i don’t know any of that shit you are talking about.
Him: "I don’t like it, it’s against REST convention its so 2006 that my eyes are bleeding. As a privileged white male i feel entitled to complain about this." Me: "you. were. eleven in 2006
Source: Kellective Github2 -
Go to the office, start the computer, get some coffee, open up Eclipse...
Java.lang.NullPointerException
Fuck this shit.12 -
I was talking to a friend of mine(more of an acquaintance really) about our shared interest in Go and how I am trying to see if I can implement it more and more into my daily activities(simple CLI utilities, maybe a web app or two) and he mentioned how much he likes it after being part of a Java shop for such a long time. He said that he got tired of the verbosity of Java and how Go was such a "breath of fresh air"
var i SomeShit
do.SomeShit(&i)
if do.Error != nil {
panic(do.Error)
}
fmt.Println("Could not agree at all")
On how bullshitty it is to say that one switched over to Golang because of the verbosity of other languages, specially when anything meaningful that you might do with the code requires constant checking.
And let us not
forget := lol.bullshit(); forget != nil {
about some of the other bs you get to do
oh look scoped errors
}
.....like I get it man. I like the language, no, It ain't replacing C or C++ for low level shit, not with a garbage collector are you fucking high?
But yes, I do like the language, they got a lot of shit right, the thing is, I feel like I know everything about it already since A) shit is way too simple, simple enough to be used by anyone really and B) other than goroutines this language does not really bring anything new to the table, far as I can tell.
I mean shit. I thought I was at odds with Python disliking syntactical whitespace enough to make me try and not use an otherwise perfectly good lang(Python I love you but hate syntactical whitespace) but Golang really puts me at odds. I love it but dislike it at the same time.8 -
I had to migrate ~100+ svn repos to git that were "useful" according to the client but found out that there were a lot of projects (+6yrs old) with only one commit message "--no-commit-message" and i'm not even joking...
And then I had to explain to these "devs" how to use fucking git with eclipse (+they all use light theme...) cos' terminal or gui client is too complicated
And then I saw their "Java libs" with ~3k line of spaghetti
Do you even dev bro?2 -
Getting beaten up over the quality of an app i'm working on with 6 interns. We have a bunch of unit tests, was shocked to see so many issues ... until I looked at the tests.
A function returning a non-optional array has 1 check ... that the return value is not nil ... fml3 -
I've just found the worst website ever. After some seconds, they show a banner with the usual "agree to our use of cookies" stuff. Of course, I clicked on settings. So it opens another page in another tab. As I started to read that page, another banner was displayed. Ofc I clicked on settings. The same page was opened in yet a new tab. I think you can see we're this is going...2
-
just my useless opinion - I don't think bitcoin will every see a big drop
at least, not for ten years
in reality, every bitcoin transaction you make is just a number in the blockchain, just like any other coin. but unlike other coins, bitcoin is #1, has hype in the media, etc.
bitcoin is essentially the name brand of coins. when people think crypocurrency no other name comes to mind.
ethureum, litecoin, dogecoin? nope. nada. null. nil. None. the rate at which bitcoin will increase will become even more astounding. people can now profit of it more and more mining will happen because more people want to buy.
unfortunately I didn't buy it and 5¢, nor $4000, but I don't think we'll see another >$3000 drop for a while.
as the enthusiasm around it decreases, the price will increase at a slower rate, but nevertheless, growing.
my recommendation: buy now. and even if it does go down $2000 after you buy it, it'll probably come back up. so when it's work $110,000 in 2020, I don't think the $2000 will mean as much.
just my two cents.
I'd love to head some other opinions.16 -
!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 -
Really regretted to born in India. I know I should not say bad about the country in which I born and living it but there are so many reasons.
Govt of India is very poor. Nothing can be processed if you don't have offered bribe or you don't have political power and pressure.
My company offering me onsite to go London for my project, govt is not issuing me PCC Police Clearance Certificate even I never had any crime.
Police says for your current address 6 month is duration you're living here so we submitted 6 months crime is nil and 4.5 years is more required.
I went to passport office and happy to submit all documentation for previous addresses so that police verification can be done but no body is taking documents
No progress in my file.
I'm too much frustrated now.
I reported to ministry and prime minister of India but even no progress.
I'm really fed-up.
:(14 -
Lua is one of the stupidest languages to ever exist.
Oh, the language is easy to learn? The syntax is friendly? There's only like negative 10 functions you ever need to know? Everything is a table?
EVERYTHING IS A TABLE?! WTF CARES? WHAT ABOUT NIL?!
The arrogance this language has is extraordinary, literally. No lang, except Lua, imposes such an opinionated dichotomy. Everything is a fucking table, or, it's nil. -- That's so fucking stupid.
And look, I get it, this lang (oh sorry, scripting language (?)) CAN be good and fun and whatever... the moment you start to do IO is the literal end of days.
Everything is nil. Except, if it's defined... then it's not nil. -- OK. That sounds sensible/reasonable enough. -- What if it's not defined? You get nil. What if it's not the right data? You get nil. Do I get errors/exceptions or whatever? No, absolutely not, you get nil... unless the application you're using with Lua with has a lib that handles that.
There are so many more issues I have with this lang, but honestly... Am I fucking missing something? Is this lang like actually super dooper awesome and I'm missing something? -- I can't not look at this language as just dumb and arrogant. -- It's literally a language where you have to manage and remember ALL conceivable state at ALL times.11 -
We need more positivity:
Reason why you like coding? / Reason why you chose it as your career? / Why wouldn't you want to do something different?
Best feeling when coding
Nicest colleague/Best teamwork experience/Best boss/easiest client
What do you like about your position/job/company
Besides coding, what makes you happy
Your favorite stack/language/working environment3 -
TL;DR: I'm stressed out over choosing a side project because of the commitment and fear of failure :(
I'm a student and summer vacation starts in 3 days (and actually has already started for me, thanks to a "smartly planned" hospital stay), so I'm currently looking for a cool project to start. This will be my third summer vacation during which I want to make complete a project, and I never actually did it. The first year, I couldn't think of any reasonable, doable project which would be interesting and fitting for the time scope (I was quite new to programming back then, so I probably couldn't have done things that would be interesting to me, an any project that I could've done would just take 20 minutes, cause I wouldn't understand anything more complex). The second time, I chose a project too big with too much new things I had to learn on the go. I actually pushed through for nearly a week, but then I realized that I only completed like 25% in that time, so I lost my motivation, thinking I could never finish it, while not wanting to start a complete new project, because that would've felt like wasting the time I put into my first project. It was still a valuable project and I learned a lot by doing it, but this year I want to actually finish a project; so I'm really stressed out right now trying to come up with a good project.
Usually I have millions of vague ideas in my head, but as soon as it comes to choosing, every single one seems to be the wrong one, or I forget about all of them. Everything that kinda interests me seems way to big and complicated to me, but I sometimes feel like I'm just underestimating my abilities, but on the other hand I have ~25 projects on my hard drive, of which 4 or 5 are finished and most will never be finished. :/
And it's just so overwhelming to choose something like that, because on one hand I really want to do a bigger project that I actually finish, and summer vacation is the only time I have so much time to code, and I love coding, but on the other hand choosing such a project that I will work 2-3 weeks on is too much commitment and also I'm anxious about failing it and never finish it, just abandon a buggy mess. Am I the only one to feel that way, or are you too having problems choosing side problems?
And, I guess if you have any ideas for a suitable project (literally anything, so that I might be exposed to some new ideas), just comment it.14 -
One crucial lesson I learned while diving into programming:
Use various learning resources. Everyone explains things a little different.
You can understand stuff much easier. -
Worked with a team of interns learning Swift. They had a really tight deadline, so they decided if they were not sure what the app should do if a nil showed up, they would just force unwrap and let it crash.
-
I invested in a brand new 27" curved monitor to work more efficiently with my laptop but now
HDMI isn't recognized by my linux distro on dual boot where it works perfectly with fucking windows and it used to work nice before the latest update
Tried to install official nvidia drivers to try to fix that
🙃 Guess who has a fucked up X configuration now 🙋🏾♂️3 -
The Javascript build/bundling eco system is killing me every time I try to get into it.
Me: oh vite, a nice and fast bundle that supports hmr
Me: works like a charm
Well until I discovered that exporting a self contained bundle with Inlined dependencies is not a thing and you have to pray that your framework provides such plugins
The world of js/jsx/tsx bundling, building, tree shaking, transpiling, Inlining, transforming is such a wild west and that on top of an already very unstable layer of different frameworks that work so fundamentally different that you cannot apply a single principle to even 2 of then (from a building/ssr/bundling perspective)
Standards signing off when it comes to building node apps11 -
Okay okay, who really uses vim? I can barely finish vimtutor.
It’s dope but I don’t know if I could see myself doing any sort of web development efficiently on it.
Seems like it would take a solid month to be able to zip around.10 -
Life goals:
1. Port Linux to Brainfuck.
2. Make a some how object oriented Brainfuck fork.
3. Make IDE for #2, with completely random auto completion.1 -
My life ends in a simple sentence:
"Unexpectedly found nil while unwrapping an optional value"
Only Swift developers will understand.2 -
So I see this code:
class ViewWithDisplayLayer {
func viewDisplayLayer() -> CALayer? {
FatalErrorMustOverride()
return nil
}
}
If only Swift bad some way of defining some sort of interface or protocol with methods to be implemented by a class without using class inheritance and wouldn't it be great if that feature also gave a compile time error if you forgot to override/implement said method(s). If only.....
😳 -
When you’re struggling, learning some new framework or concept and your friends still think the entire internet is made solely with html and css because they took desktop publishing in 9th grade.
-
Lua users, have you used moonscript?
It's a little language that has it's own interpreter or can be compiled down to Lua and it's absolutely lovely (currently using it with Love2d).
Of course, as with most things, what I love about it also royally pisses me off sometimes.
For starters local has to be declared for variables, unlike lua.
Otherwise the variable goes to _
Also note, that some tutorials literally tell you the opposite.
all variables are local by default
unless you don't declare them
then they go to _ (throwaway)
Some tutorials get this wrong too.
all variables have to be declared local
except tables. failure to declare a table WITHOUT a local will cause things like
table.insert to fail with "nil" values for no god damn reason.
No tutorial I could find mentioned this.
Did you know we call methods with '\'?
By the way, we call methods with '\'.
Why? Who the fuck knows.
Does make writing web routes more natural though.
Variables in the parameters of new are declared and bound for you. Would have loved to know this before hand instead of trying
to bind to them like a fucking idiot.
Fat arrows are used to pass in self for methods.
Unless you're calling a method. Then you use backwards slash. This fact is unhelpful when you're a beginner and dealing with the differences between the *other* arrow, the backslash, the fat arrow, and the fact that functions can be called with or WITHOUT parenthesis.
And on that note..
While learning all this other shit, don't forget parenthesis are optional!
Except when they're not!
..Like when you have a function call among your arguments and have to disambiguate which args belong to the outer call and to the inner call! Why not just be fucking consistent?
But on the plus size, ":" is now used for what it should have been used for in the fucking beginning: binding values to keys.
And on the downside, it's in a language thats built on top of another language that uses it for fucking *method calls*, a completely
different fucking usage.
And better still, to add to that brainfuckery thats lost in the mental translational noise like static on a fucking dialup modem, you define methods with the fat arrow. Wait, was that the single arrow or fat one? Yeah the fat one. Fuck. But not before you do THIS shit..
someShit: =>
yeah, you STILL include the god damn colon just so when you're coming from lua you can do a mental double take. "Why am I passing self twice? Oh right, because fuck me, I decided to use moonscript." It's consistent on that front but it also pisses me off.
A lot of these are actually quality of life improvements disguised as gotchas, but when you're two beers in to a 30 minute headscratcher it sure doesn't fucking feel like it.
Nevertheless, once I moved beyond the gotchas, it was like night and day. Sure moonscripts takes a giant steaming dump all over the lua output, like a schizophrenic alcoholic athena from the head of zeus, but god damn, when it works it just WORKS.
Locals that act like locals? Check.
Sane OOP? Check.
Classes, constructors, easy access to class methods, iterators? Check, check, check, check, check.
I fucking hate ceremony. Configuration over convention is for cunts. And moonscript goes a long ways toward making lua less cunty.
If you've ever felt this way while using lua, please, give moonscript a try.
You'll regret it, but in a good way!6 -
When leaving my computer logged in, for a few minutes, I always run "cmatrix" in fullscreen ... no one dares to touch it.
-
Recruiters or their bosses with sick ambitions and zero feedback.
Do I need to say more?
Spent few days to make my site looking good on desktop/mobile with few screenshots and even video to show my working projects in production. Even more few days to make really detailed 2 A4 CV with my previous job and what I was doing there. All generated from markdown.
I even saved money around half a year to go and live month in other country (Ireland, Dublin) and then on site send about 150 applications on various sites, emails, linkedout and local IT meetings.
Null, nada, nil, NaN accepted applications.
Is it some kind of joke? All companies almost cries for new workers and they don't even answer someone which founded and have no problem with growing own IT company for almost 5 years with self learnt, practically applied in production linux, HTML, CSS, JS, PHP, Go, bash, KVM and Openvz virtualization knowledge?
What they really want?
Astronaut with Brainfuck and Cobol with fluent backwards speaking Esperanto riding on monocycle with 3 hands and no need for sleep for -1 whoopercoin?1 -
Swift SUCKS
Why?
Because of its absolutely useless complexity...
a total simple thing: i have a string and want to concat a integer with it, so:
var x = stringVar + intVar; right? NO
its var x = stringVar + String(intVar);
or getting the index of a element in a array?
var index = array.indexOf(element); thats logic, right??? Not for swift, gotta go with: var index = array.index(of: element); WTF??!!
And all the other shit: nil instead of null, int++? Nope.
And there are SO MANY MORE things, where u just think, Apple really though different........than all normal coding languages.......
I´ll honestly rather learn C and recode Ios or have a look at objective-c...14 -
Maybe Rant
It's 1:30 AM and I finally finished implementing a simple function after more than an hour.
Not sure if I should be upset about my stupidity or glad that I solved it.
If anyone is interested in learning Haskell I totally recommend these exercises: https://github.com/data61/fp-course
filtering :: Applicative f => (a -> f Bool) -> List a -> f (List a)
filtering p = foldRight (\a -> lift2 (bool id (a:.)) (p a)) (pure Nil)1 -
I'm currently in France and after watching my first YouTube video here, I learnt to import lessons: 1. You can't escape from the udemy ads 2. The French seem to pronounce python (as in the language, obviously) like a French word...22
-
As a designer, I don’t really like material design.. but I’m dabbling with vuetify and i must say, it’s dope. And is making my life better3
-
!rant
Loving the the fact that constructors in Swift (initializers) can fail (returning null/nil) and be async.
In C# there is no other way than using static methods instead.8 -
My top 3 open source projects are :
KDE ❤️❤️❤️❤️
Libinput gestures (allows you to do custom actions with your touchpad)
Strapi (Wich is a nodejs headless cms that gets the job done very quickly I haven't tested it in prod tho)1 -
I woke up this morning thinking "what if Trovalds doesn't GPL-released Linux" and i got like all:
Edit:
*Shooting stars music
:v1 -
So I live in the south. And it’s been pretty cold here the past few nights. And now there’s a gaping hole in my laundry room and water going everywhere and a plumber who seems to still be reading the README.md file. And my kitchen is flooding. And my gf is losing her shit. And I’m drinking coffee sitting at my bar, checking emails. Somebody wake me up.9
-
if err != nil {
if err.Error() == sql.ErrNoRows {
return nil, err
}
return nil, err
}
found me some choice, grade A Go code here.5 -
Things nobody told you when starting to learn a new programming language:
Congratulations! You became a collector. From now on you will collect websites, books and a ton of related software.4 -
I’ve been a freelance graphic designer for a while and in the past months I’ve been moving over into web development.
The biggest challenge has been going from visually designing, to verbally and mentally designing. Definitely a struggle2 -
When you’ve been learning for 3 months straight almost 60hrs a week and still basically don’t know shit.5
-
I give up. I am having trouble understanding Go lang *, & stuff.
attached code does print what fmt.Println has, but the function calling: FindByID is throwing invalid memory address or nil pointer when it attempts to use the result of the code.
Can someone please explain where I'm wrong?
Error log blames the line of "if" condition even though fmt does print its output to console16 -
Any web developers care to share their file structure when breaking css / pre processed styles into modules? Want to organize but I don’t want to over-do it.1
-
So I plan to ditch my 17" heavy gaming laptop to chose something more suitable for school for a (13/14") ultrabook (I plan to run Debian on it) that has a decent battery life
Anyway, I looked at those chinese ultrabook on AliExpress/gearbest but I'm a bit skeptical about some factors.
Anyone has recommendations about a model or some advices?9 -
The feeling when getting the one thing you've been working on for hours to work ... HOYL YS HIT!11!!
-
Once a week because I’m studying Web Development. Once a month because I’m a fulltime freelance designer.
-
So many changes over the past few months. Transitioning from a freelance logo / print / packaging designer. Going full stack web developer. Even switched from adobe CC to Sketch for my design needs. What a ride. Everything I come across is new territory. I’m like a newborn baby. The struggle.
-
Pluralsight is so infuriating. First of all my trial lapsed (classiccc move) so I figured I would use it.
They’re content is so outdated.. it’s driving me mad. The past 3 courses have been 2+ years out of date.. and I get it, it’s a lot of work to maintain a course but could you not at least provide links or new annotations?
And I’m not talking a couple of package version updates where things change. This guy is using Bower which to my knowledge is pretty much deprecated and references yarn. Which completely breaks the course.
My thing is, why are you charging $30/month (i think), if I have to jump through these hoops to learn??? I was doing a great job of that on my own via google and YouTube.
The one Udemy course I bought is constantly being updated with notes and annotations and boy do I appreciate that. They’re marketing and cookies are toxic but at least the content is reliable.3 -
Haven’t learned in a classroom setting, but am learning from multiple online sources and it would be way more helpful to teach thought process and practicality than syntax nuances.
-
I cannot believe that MS has not thought of something better than UAC... trying to re-install ADConnect after fixing an error, msi shits out 2502/2503 errors even though it worked first time on the original install. The fix, run the msi from an elevated cmd. Come On Microsoft!!!7
-
On the newer side of web development. Using CSS Grid with some flexbox. Any idea on why my 768px media query styles are overwriting my 320px styles?
I was breaking into modules but moved everything to a single css file until I figure out what causes the issue. The mobile styles are at top and I started the medium breakpoint below the initial styles.
Designed it mobile first if that makes a difference. Should the media queries be nested?13 -
git commit -m "FIXME: [bug description]
I do this only on my own projects, because even though the code is buggy, it's better to be able to com back to a less buggy version than to have to choose between a way to old version and an even worse version, after I introduced some more bugs -
What would you want to tell to your past you ?
Like, the advice that could have helped you a lot if you heard it at the right time4 -
Trying to understand why there is an absurd amount of tooling for most nodejs apps. Is this present in other languages as well? Is it worth learning? From my viewpoint as a new developer, it seems like there should be more consolidation there. Or a more elegant way to build1
-
Does anyone know the reason behind why JavaScript Arrays start with an index of 0 instead of 1? Or why the .length property starts at 1 instead of 0.11
-
"Unexpectedly found nil while unwrapping an Optional value"
What dev thought this would be a good idea in Swift? Sometimes I hear the compiler's thoughts as it comes across this:
1. The dev explicitly told me this value would be optional.
2. I have a record from the database, and I see a 'nil' in the column for this value.
3. That's not "None" , Oh my god, I need there to be an explicit "None<CustomType>".
4. Shit shit shit shit. Oh my god.
5. PANIC!4 -
Okay question, I know it doesn’t matter for personal use but I’m not sure what the general consensus is in a team setting.
If I’m using a css framework in a project, and I customize it to match my style guide, does that require documentation usually?
Mainly speaking on changing the colors here for the most part I’m not going Rambo on the original files.
I’m asking in case I catch some freelance gigs; I don’t want to be clueless if there’s a few others on the project as I’ve only done solo work.2 -
What’s a practical use case of the ES6 spread operator? I’m pretty fresh and would just like to see a real world example where you would need to destructure some array values and apply them to function Params.3
-
Not sure if reading tech blogs in bed while falling half asleep is a sign of brilliance or insanity.2
-
The following is a genuine error from the runtime when you give apple a "nil" date:
2012-09-19 22:40:13.972 APPNAME [4923:907] * -[__NSCFCalendar components:fromDate:]: date cannot be nil
I mean really, what do you think that operation is supposed to mean with a nil date?
An exception has been avoided for now. -
HELP
Why does gcc fails to compile?
main.c:10:1: error: unrecognizable insn:
10 | }
| ^
(insn/f 18 4 19 (set (mem:SI (pre_dec:SI (reg:SI 1 bx)) [0 S4 A32])
(reg:HI 0 ax)) "main.c":8:1 -1
(nil))
during RTL pass: shorten
main.c:10:1: internal compiler error: in insn_default_length, at insn-attrtab.c:221
0x61f93f _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
../../gcc/rtl-error.c:108
0x61f95b _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../../gcc/rtl-error.c:116
0x742291 insn_default_length(rtx_insn*)
/home/user/Documents/gcc/build-d16i/gcc/insn-attrtab.c:221
0x9ee716 shorten_branches(rtx_insn*)
../../gcc/final.c:1118
0x9ee78f rest_of_handle_shorten_branches
../../gcc/final.c:4753
0x9ee78f execute
../../gcc/final.c:47828 -
Just starting to learn front-end js frameworks ( vue ), and I'm curious. What are the advantages or disadvantages of routing in an SPA vs traditionally redirecting the user? Besides the fact that you don't have to create routes in the backend.
Are there any effects on SEO?
Are there any substantial performance differences?10 -
Every time I am tired of writing default values for optional values (values that can be nil but HAVE to have some default value unless they break the app / program I just tell it to be any valid value instead of nil,and if it’s nil the app / program crashes the fuck up.
I test it by feeding it ONLY valid data.
Irresponsible, I know, but none of my projects have passed testing phases and all of them never really finished development.1 -
Has anyone used Parcel over Webpack to bundle on smaller projects? If so any downsides that you came across?1
-
Golang: It's stupid that the language doesn't allow the variable 'result' to be used out of the if scope, although it's been declared outside the if scope:
if result, err := foo(bar); err != nil {
// do something with err
}
// no err, so do something
// with result.
// But No! you can't.3 -
Hey guys I have a NUC and a spare monitor are there "fancy screensavers" that I could modify if needed ? Or should I do one myself haha5
-
Help is needed on observability tools to use.
I’m in the trenches trying to sort out tools for observability.
Did a bit of Googling and ran into Metoro and Groundcover. Both seem pretty slick, but I’m not sure which one to roll with.
Do any of you have experience with these? How do they hold up in real-world scenarios? Would love to hear any war stories or insights.
I've been looking for Grafana as well, but it doesn't fit my budget at all.1 -
Can someone explain the future of PHP? (Serious question). I was under the impression learning php is mainly for the current job market. Otherwise the future is nodeJS, ruby, python etc.
I’m asking because I see a lot of leading development and courses on laravel for modern development and I’m wondering how relevant it is to the future.1