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 - "else"
-
I met my girlfriend due to code.
There were these free courses for competitive programming as a preparation for the informatics olympiad and we got along and made weird programs and had a great time. Most of the other people there were much younger than us, and in the actual finals she ended up beating me by quite a bit, yet she still dares to say I am a better programmer.
It's been almost a year since then. Wow20 -
if (num == 1) suffix = "st";
else if (num == 2) suffix = "nd";
else if (num == 3) suffix = "rd";
else suffix = "th";12 -
I think I get a programmer high.
Like when I program, I get really into it, time is flying, I'm having fun problem solving, I am super focused, my brain is thinking super fast, and I have a hard time stopping.
Maybe similar to a runners high?9 -
So sick of my colleague who keeps writing:
if (something) {
doWork();
} else {
}
He insists that it is the best code style to include the empty else clause. WRONG YOU #!*&@!14 -
When you're typing "make sure noone else is ..."
but your fingers automatically types
"else if"
Damaged beyond repair2 -
AI in a nutshell
if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if else6 -
Job offers that list "high speed internet and a laptop" as employement benefits realy piss me off. Do they think other companies force you to code on paper and send it trough mail?8
-
So... my girlfriend has a very random work schedule. Sometimes she works 4 days a week sometimes only 1, sometimes only at the weekend sometimes not at all. If only there would be an app to track that... 🤔
She tried quite a few apps on the app store but they were shit/ugly/too complex..etc
Wait.. i’m a developer, i can do that.
So i made a dead simple calendar-like app in javascript+fuseopen.
She selected the colors, background, layout etc..
If she taps on a date it turns red indicating that is a workday, if a workday is tapped it turns back to normal color.
The main logic is:
Main:
If(AppHasSavedWorkdays){
//check if save is current month
LoadCalendarWithWorkdays();
}else{
CreateEmptyCalendarAndSave();
}
She likes it.
Cool, so let’s build this! She has an iphone and my mac is still in the service center so i can’t build🙁
But its okay, i have a mac at my office, we can build there, the only downside is that is 40min of travel.
We take the subway, go to the office, build the app, make a certificate, install to her phone, everything goes as planned.
Coming back we were lucky enough to catch the bus that goes in 30 min intervals, we only had to wait like a minute so life is good 😃
I enter the house, chill down on the bed, pull out my laptop to close the project when a FUCK ME!!!!
I completely forgot to implement a whole else branch on start!!!
Soo the app does nothing when is opened on january 1😂😂
I guess that’s why we have testers and qa.. 😃8 -
My team mate has just found the best conditional statement I've ever seen, in a source code he received from the client.
if (1 == 1)... and it has an else branch :D11 -
So my team lead told me in a code review that you shouldn't use 'else if' in code.
Instead you should best them like:
if
else
if
else
if
else
Apparently that would improve readability...
Am I crazy, or what?18 -
"Talent hits a target no one else can hit; Genius hits a target no one else can see." - Arthur Schopenhauer13
-
Who else uses Firefox over everything else? I switched from chrome recently and I don't regret it!26
-
Just found this while trying to understand some code:
```
bool ok = true;
if(ok) {
// lots of code here
} else {
// even more code here
}
```
I thought this was worth my first rant...6 -
no matter how big shot programmer you are, you 90% time you will only code
if(condition)
{
// do something
}
else
{
// do something else
}8 -
found this in our codebase today
try {
//do something
} catch () {
try {
//do something else
} catch () {
try {
//do something else else... this goes on 4-5 levels deep
} catch () {
//log... couldn't do
}
}
}9 -
Anyone else is doing this? When you know you need to implement it, but want to fucus on something else and #TODO just doesn't cut it. xD3
-
Finals for the Belgian Olympiad in Informatics in an hour. I'm stressed. Had the second best score in the first round so pressure is on10
-
devRant has a good design, but am i the only one who finds the refresh button a bit unsettling? Would anyone else prefer something else?22
-
Gotta crank put a website for our new store in 2 days, with a webstore and figure out how to get pokemon into the actual shop. And the hosting gives me 50MB. Yes. In 2016.2
-
Close all IDEs.
Then...
if (needs_music) {
open.production("fl_studio");
} else if (needs_engine_roar) {
open.game("fsx");
} else {
open.systemapp("Task Manager");
kill.all("processes");
computer.shutdown(5000);
}6 -
What's the point of abstraction layers if you're riddling all the code with
if (AbstractionLayer.SomeType instanceof ImplemantationLayer.SomeTypeIml1) {
// do stuff
} else if (AbstractionLayer.SomeType instanceof ImplemantationLayer.SomeTypeIml2) {
// do stuff
} else if (AbstractionLayer.SomeType instanceof ImplemantationLayer.SomeTypeIml3) {
// do stuff
} else if (AbstractionLayer.SomeType instanceof ImplemantationLayer.SomeTypeIml4) {
// do stuff
}
???
Seriously.. Guys. Am I missing some point here?9 -
Else if, elif, elseif, if else garrgghj. I can never remember what it is in whatever language I happen to use...13
-
I'll never ever understand how my boss always ends up doing this kind of bullshit
This is production code, there won't ever be anything in there, NEVER9 -
Today in horror stories: setting up the local dev environment for a project I'm taking over creates changes and notifications in prod.
Oh and my local dev env is somehow receiving data from actual patients. I don't know how.9 -
Working with somebody else is great, because there is somebody else to blame, on the other hand there's somebody else to blame..
-
That time you waste hours searching through a perfectly good method. Turns out the outcome is overridden because you forgot an else in an if-else statement....
-
When somebody else in the office steals your rant, puts it up on devRant and gets more +1's than anybody else on devRant.4
-
I have one confession.
I have never ever in 15 years of coding used switch case...
Never liked the syntax.
Am i the onlyone ?17 -
TL;DR just read this
So my current (student) job. Asked me to count inventory. Did so, on paper because nobody had a list of the product barcodes for easy cumulative scanning. I also made records for every single barcode. Then I had to key it in onto the Bookkeeping and sales software thing. They don't have keyboard shortcuts, so I quickly made an ahk script.
Had to manually type in everything 3ven though I had a digital listing.
Software lets you print barcodes for products but gives you an error when you try because you haven't assigned a code. WHICH YOU CAN'T DO IN THAT Crap. You also can't search for a product based on code.
Found out it used access as a back end for that buggy c++ thing that crashes with 'operation not permitted' when you press the red x. Great! Now I can import! And there is a barcode field. Wow. Fucking fantastic. What a fuckfest.
Their website. Their fucking website. Great from a user's standpoint, but my God. It uses joomla! However, version 2.5. That hasn't been supported for a long time. Part of the images are hard coded into the theme. The text editor flips. Adding a page sometimes works, sometimes it doesn't, and sometimes makes 2 pages.
And their cnc lathe runs on a laptop with Windows 3 on it, but hey, fine5 -
Noob question here, I see that every single iOS developer around here is shitting on Xcode, but then I saw this today on my way to download PHPStorm. Anyone tested it? Thoughts?7
-
So I'm tasked with rewriting the old software my employer uses to track basically anything in his company. They want to stick quite close to the old workflow as much as possible, I get that.
"Why exactly do you need access to the system? No you don't need to look at it just recreate the flow. I'll give you the sql structure is that OK? Oh and this won't take long, you can copy from the old code can't you? Wait why do you need access to the code? No. "
🙄7 -
Is there a relation with bad long term memory and programmers?
Most really good programmers I know don't have great memeory10 -
what is the else there for, it reminds me of all the times I saw shit like
if(variable == true){
}else{
doSomething();
}8 -
So I wrote a python code and was waiting for +1 on code review and I needed to merge it fast. That shit of a reviewer took his time to finally NOT give a +1 with comment, "if statement has no else part". OF COURSE IT DOESN'T HAVE ELSE PART. I DON'T NEED A ELSE PART. But to give him the benefit of doubt, I'd like to ask devRant community if they believe all ifs should have elses.14
-
Fucking mongodb I swear to god what is your problem, why do you close all connections after successful authentication you piece of concentrated crapjuice and why is the best information you can give me a pissing "Connection ended" message your demonic unholiness?
Stick a cactus up your rear, pot included5 -
When you have to made a little game with javascript, and because it's your first game you made a beautiful maze with lot of wall.
Ahahah... i'm shit.
I forgot wall have collision.
I'm here now, with 40 different fuckin' walls and much if and else if conditions.
I hate me.
Yeah i know, I can just change my maze but no... I'm lazy. Cry against the collisions is better.
Have good day.9 -
Code of developer's life
int f = 1;
If( life == "smooth")
problems();
else if( life =="hard")
{
problems();
breakup();
}
else
{
while (f = 1)
{
bugs();😣
}
}15 -
Western Digital, please, for the love of all things holy and not entirely shit, stop making your external hard drives flash a fucking flashlight when they are in "sleep" mode (attached to a sleeping laptop for example). I would like to sleep you beerpissers!6
-
- Bad at pretty much everything else
- Bad at pretty much everything else
- Bad at pretty much everything else -
bool isTrue(bool val){
If(val == true){
return true;
}
else if(val == false){
return false;
}
else{
cout<<"Wrong value";
}
Function isTrue is the future ! 😂😂😂2 -
Will these fucktards just FUCKING FIX EDUROAM! alright it's a WiFi network that works across the globe and there's challenges with that BUT DON'T MAKE ME HAVE TO MANUALLY RECONNECT EVERY random amount of time!!! I'll shove that fucking MSCHAPv2 down you fucking throats with that sweet sweets PEAP sauce bloody arseholes.
What do you fucking mean it works fine? NO IT BLOODY DOESN'T! Get your shit together and at least handle DHCP leases correctly and make them not expire every fucking minute!!
Also, how the flipping fuck does connecting to the eduroam VPN from within fucking eduroam make it more stable? Only ever so slightly though. Incompetent pieces of dick sucking craptards don't make me have to bring out the ethernet jack EVERY FUCKING TIME at school for christ's sake.
No, it doesn't make it my problem because I'm running Linux. Look on the Internet. The forums are fucking filled with people having issues and your docs are from 5 years ago so please kindly FUCK Off!!!15 -
Today in Cursed Java error messages, this beauty: `java.net.MalformedURLException: no protocol: "http://knowledgebase-api.development.svc.cluster.local/..."`
Yes, no protocol. You read that right. There is in fact a protocol there.10 -
Fucking exam on Electronic Building Blocks... (aka Arduino). Program this thing ON GODFORGOTTEN PAPER! And then these retards put in that assignment line: max 5 lines of code, for a function that does nothing more than divide two shit eating numbers! And half of my apparently vegetative class fails this! When you were allowed to use your book and notes!
Oh and also, here's a seemingly pissed over image of an arduino with some peripherals, draw the wires. Draw! How the fuck do I keep 21 cocksuffocating wires on a page without overlaps or unclarity? -
"X Æ A-12" started crying in the morning. So I just used a neuralink prototype and now am able to understand what he wants.
*Relaxed*7 -
Found this in production code.
For those who doesn’t understand Delphi:
switch (some boolean) {
case false:
// some code
default:
// some code
}7 -
Anyone else hates this kind of statements:
if ( doSomething() != SUCCESS ) {
//log error
}else {
//continue doing other stuff
}
I simply find that confusing. This is much better:
If ( doSomething == SUCCESS ){
//continue doing other stuff
}else {
//log error
}
Maybe just my opinion.17 -
I'm a Linux guy, but for some goddamn reason I work in sound. Which means I need vst plugins and windows. EVERY FUCKING TIME WINDOWS OVERWRITES MY DARN LINUX PARTITION just enough that I can't recover it AND THEN FUCKS UP THE BOOTLOADER THAT I CAN'T EVEN BOOT Windows. Whyyyyyyy? I just want to work or play a game but now I'm stuck fixing bootloaders and corrupt partitions...... Fml8
-
Mind blow of the week: JavaScript has no "else if".
It's always two tokens. Not one. It's NOT like python's "elif".
It's ALWAYS chaining an additional and DISTINCT if statement in the else clause of the first. It is NOT creating multiple comparison paths in the same if statement as it would seem.
For example:
if(a) console.log(a);
else if(b) console.log(b);
else console.log(c);
Simply needs more proper indentation to show which "if" the "else" actually belongs to:
if(a) console.log(a);
else
if(b) console.log(b);
else console.log (c);9 -
Why in the everliving freaking fuck does Java have a class called URLEncoder which DOES NOT DO URL ENCODING??? The shit-spraying piece of a mouldy footgun does formencoding?? Which sadistic maniac thought that was a good idea?8
-
var myLove =0;
var myLife = 'you';
if(yourHeart =='Me'){
myLove =+1;
else {
myLife = null;
myLove = undefined;
}4 -
CoWorker: so when are you going to be out?
Me: taking 1 week off Oct 1. I need a break from production issues and all these critical tasks...
CW: ah OK yea, you deserve it. So where you going?
Me: well I'm planning to just stay home unless the weather is really nice. I'm going to try React Native to build a mobile app and maybe look for some open source projects... O yes gotta look into my investments too...
CW: Oohhhh... Ok.... (We go on talking about Trump and why somehow the markets haven't crashed yet...)2 -
Was reading about FizzBuzz/Algo again and I guess the modulo run-time.
The most optimal solution I came across is like:
if (x % 15) FizzBuzz
else if (x % 3) Buzz
else if (x % 5) Fizz
else x
But then how long does % take? Should you care?
I was thinking it should use variables:
var f = x % 3 == 0
var b = x % 5 == 0
if (f && b) FizzBuzz
else if (f) Fizz
else if (b) Buzz
else x10 -
class Bug():
def __init__():
self._fix = random.randint(1, 6)
def fix():
if self.is_feature :
return Feature(self)
else:
if random.randint(1, 6) == self._fix:
Bug()
del self
else:
return Bug() -
Just saw an advert for a macbook Air in a local computer store. They called it "power. To. The tenth power"1
-
Use Xamarin, they said. It will be easy, they said. You will only need to write your UI once, they said. NOPE
Documentation is shit, I've been sitting here for the past hour and a half figuring out how to add an icon to a button in their shiny XAML thing for which they have NO DOCUMENTATION. THEY WANT YOU TO HOE IT OVER C# BUT THEY ONLY GIVE EXAMPLES IN C#. And now I'm trying to figure out where I can download the iOS UIBarButton icons, because you can't use native icons and fuck apple too, they don't want to give em to you.
What a hellhole.
All while my client is constantly spamming me in all ways, distracting me, marking issues as "supercritical" (which makes an alarm ring on my phone and is only meant for emergencies) and otherwise distracting the living daylight out of asking for screens of the UI.
AND I STILL PREFER IT OVER ANDROID STUDIO. Don't even get me started on that one.2 -
A programmer's wife sends him in a grocery store with instructions "Get a loaf of bread, and if they have eggs, get a dozen". He comes back with a dozen loaf of Bread and Tells her "They had eggs"4
-
"If all else fails, [working harder than anyone else] is the greatest competitive advantage of any career." - John C Jay
-
That moment where you see code of someone who riddles their code with nested if-else and if-elseif statements.
I don't remember writing an else statement for years. It almost always can be avoided (and the rare cases where it makes sense I prefer the switch statement).
Yet I never grasp why people do:
```
if(someCondition) {
// huge nested code block
} else {
throw new Error();
}
```
Instead of
```
if (!someCondition) {
throw new Error();
}
// continue in the normal scope
```
And then we have experts that like doing:
```
if(someCondition) {
if (bar) {
$foo = 'narf';
} else {
$foo = 'poit';
}
// huge code block
if($foo == 'narf') {
if(yetAntherCondition) {
// huge code block
} else {
throw new Error();
}
// huge code block
} else {
throw new Error();
}
} else {
throw new Error();
}
```
Help!
If ever was to design a programming language, I'd forbid the `else` and `elseif` keywords. I have yet to find an instance where I could not replace some `else` by either a guard or an early return or introducing some polymorphism.1 -
There's seriously a girl here following DAE (Game development) with one of them fancy tiny macbooks. Yes the one without escape. I wish her good luck and congratulations on being rich and a retard who ignores school advice on laptops4
-
!dev. NMBS is Belgian rail service
Fucking NMBS you arseholes! Put a cactus in your arse and a pinecone in you urethra and go sit in lotus position with me in your neck!! The fucking train of 0920 still has to leave, it'd 1250 now! My train has been cancelled, everything else has at least 30 minutes delay. They announce over the speakers that a train will come in 3 minutes to the next station. Train fucking rushes by like a fucking drugged roadrunner with TNT on its burning tail! You had better payed back my ticket or I'll smash jn that fancy window at your ticket office and choke you until you carry me home fucking arseholes.3 -
So, a while ago i thought i was the inventor of the while-if. If a while statement fails, it would execute the else behind it. I had that idea for the C language:
It looks like this:
while(false){
// will not be executed since while condition is false
}else{
// will be executed since while condition is false
}
I've contacted the C work group if it is something to build in C since it prolly won't break any existing code bases.
I was enthousiast. Imagine if you could invent a new feature to such a classing language.
I got response back: is it like the python while-else?
Me, been while have been python developer for a while, finds out NOW that python has it already! Damn, such a great language.
while False:
# won't be executed
else:
# will be executed
DAMMIT! Still, they said that it doesn't mean it won't become a standard and got requested more examples. Did that ofc. Let's hope20 -
1. Commented code instead of actually cleaning it up.
2. Returning default return variables instead of rewriting obsolete code. (Generally if/else conditions with return). So instead of removing the if/else statements i return default value(null or empty objects). This is when the case of if/else will never arise. -
NO ONE EVER MADE A DIFFERENCE BY BEING LIKE EVERYONE ELSE... And NO ONE EVER BECAME GREAT BY COPYING SOMEONE ELSE...7
-
" Under the hood... the program is using a mix of condition-based learning, procedural generation of sentences/questions, and relational queries based on weighted 'topic' identifiers. It can create its own original statements and questions. It is real-time, and it really does 'think' (an internal dialogue feedback loop)." = If Statement
I saw this in the description for an app aclled "Real AI" -
#ifndef rant
if(devRant.versionType == versionType.development) {
bugCount = 0;
feedType =feedType.smooth;
startupTriesRequired =1;
worksWithVPN =true;
}
#endif -
Else Heart.Break() has anyone else played this if not. Strap on your modifiers and pick you up a copy because this game is full of spark.4
-
if(this.rant.value < 69)
RequestToReader("Please give upvote");
else if(this.rant.value > 69)
RequestToReader("Please give downvote");
else
RequestToReader("Comment: 'Yeah, Party!' "); -
That moment when you have issue reports from clients about someone else half complete rushed code that got through yet someone else review... I'm not gonna fix that myself...
-
“20” twenty static code if conditions...
if() {} else if(){} else if(....
with static code contains the different names of some users... and he still thinking that it the best way to do it!!!! -
Anyone else have or had a computer science professor you wants you to hand in a printed copy of you code? P.S. Only the printed copy nothing else.1
-
That's gonna be a quick rant about Golang.
Anyone else here frustrated by the fact that you can inline assignment in the if statement, but can't inline the if-else itself?
You can do:
if thing := hey.getThatThing(); thing == theThing {
return 'this'
} else {
return 'that'
}
But can't do:
return 'this' if hey.getTheThing() == theThing else 'that'
Or is it just me using too much Python everyday and connecting that with Go in free time?5 -
Coffee is 50 cents a cup in uni.
Coffee
Coffee
Moar coffee
FuckimsohighImmajumpallovertheplacenowihavetositdownshiticantfuckbutcoffeeislife -
Favorite IDE: JetBrain's WebStorm (for JavaScript stuff), Intellij (for most of everything else).
Why: cause it literally saves you time.
Bonus: VS Code for anything else (python or golang)3 -
Not loving the implicit return statement within Scala. I like to avoid else statements to keep the level of nesting low and do early return yet Scala doesn't allow that.
(I am aware that I should flatMap that shit though in some cases I just want a simple if not foo then throw exception line. And continue with the next block until I return something.)
So you either have to create if-else-nesting beats or use pattern matching. The latter seems overly complicated for this use case (though it has its moments).
I know that I can make the return explicit yet the linter warns against that. It feels so verbose and I currently do not see any benefits and would argue that the code becomes both harder to read and maintain.3 -
wow....what a great way of representation.. your screen is doing something else and screen cast something else...1
-
I already got tired of “AI”. The hype train has been so ridiculous. It’s been months since at least 50% of the orange website is not about AI. Every other tool/company that I use is adding new gimmicky “AI” features.
It’s probably just me but I’m exhausted of AI…1 -
Be developing a react native app with create-react-native-app.
Almost done, time to eject! Let's install Android studio. 6 GiB free on /tmp, that should work. yaourt - S android-studio
Oh no! Nit enough space on tmp! Ffs and then that is without the Android sdk!4 -
Fizzbuzz
for (var num = 0; num <= 100; num++)
if (num % 3 == 0 && num % 5 == 0) {
console.log("FizzBuzz");
}
else if (num % 5 == 0) {
console.log("Buzz");
}
else if (num % 3 == 0) {
console.log("Fizz");
}
else {
console.log(num);
}11 -
I want to have pong board on a big screen and users connecting to it using their mobile.
I know I need to learn websockets, anything else? Any recommendation? The simple as possible with less third party libraries as necessary so I can actually full understand it. Its mostly for my own learning :)
Google experiments has a nice list of examples but no tutorials:
https://chromeexperiments.com/mobil...6 -
public String findHappiness()
{
if(EverythingOk)
return “Drink Beer”;
else if(EverythingNotOk)
return “Drink Beer”;
else
return “Drink Beer”;
}1 -
def devRantPostAction(post : DevRantPost) = {
If ((post.contains("fuck") && ContradictsItself(post)) || ContainsBrilliantGif(post) || ReferencesPornSite(post))
PlusOne
else if (ContainsSqlInjection(post)
MinusOne
else
Ignore
} -
How hard can it be to let sql just multiply some values and sum the results, right? As it turns out, damn hard!
I hear you thinking, surely you can just do select SUM(price*amount) AS total right? Nope! I mean, yes you can, but it fucks up. Oddly. It always ends up giving me wrong results. Always. Wtf sql? And it's not like I'm running a massive dataset or anything, it's like 100 records at most?28 -
So, are we gonna ignore the fact that Pied Piper could have been successful, had they used if else on the encryption to block the AI from tampering with an encrypted data?3
-
So I just enjoy the intellectual social and sexual company of adults and noone else, without horrific drama attached and strange fetish, is there noone else like this ?25
-
I believe ternary operators should be banned in python/ruby. They are confusing, irrelevant and people use them in bizzare places.4
-
so , anymore starting off "developers" like me here ? Coded an android app and not much else important , anyone else just starting off to learn stuff here ?
-
Warning - Not IT related.
Long ago, I had a chemist professor who told us a story. She worked in a laboratory where they have studied cristal formations, so basically made a liquid highly capable to form cristals, and they watched them forming, doing tests and so on. In the meantime new building of the campus opened and they had to move the lab to the new location, which was a fourth floor of newly made building. Few of them started to work there even before they moved the old materials and equipment and they started few cristalisation studies, the interesting part is that the cristals didn't formed. She said that at the end they had many cups with prepared liquid and apsolutely no cristals for weeks, but one day the lead researcher arrived with the old, already formed cristals, from the old lab, and toon those inside of the room with prepared cups all the cristals started to form at the same time. After telling us a story she asked us not to tell this to anyone because the science currently doesn't accept this phenomenon and we will be demonised and looked fools it the scientific community.
This story made a hole in my brain...
It was like 10 years ago, and as a problem solver I still have sometimes some weird ideas about it, and strange explanations comming from nothing, and without any deep understanding of quantum physics or even cristalisation. :D1 -
It's so easy to use for-each loops instead of if-else chains, yet when I write a system in for the first time, I always find myself doing the latter.
"It's placeholder code" saves me every time as long as I rewrite it later.6 -
Wtf Fedora? I install the develop version of TheFuck to work on a plugin, all of a sudden dnf only runs with sudo but gives a module not found when run as normal user? Whyy?
Python import system is a bloody mess, 1 file somewhere with the wrong name and it imports the wrong thing which doesn't contain the thing and crashes.
Can't we just please have STATIC BINARIES? Please? Fml1 -
For web automation, what do you prefer?
1. Playwright
2. Puppeteer
3. Selenium
4. Something else
&
1. Python
2. TypeScript
3. JavaScript
4. Something else9 -
Might be starting a flame war here (pls don't) but I just want some advice. Torrent clients? Which one to pick?6
-
Anyone know how to get by the "Out of Memory" error on Android Studio when an image you have is like 102941092301mb too big and it crashes your app when you debug?
pls I need help, this image looks terrible when it isn't the resolution I would like...7 -
If (true) {
// do else action instead
} else {
// fallback code
}
...no one else is in the pod, I "could" open a bottle, but I also have a deadline. X-o -
num = float ("input a number:")
if num>0:
print ("it is a positive number")
else num=0:
print ("it is zero")
else:
print ("it is a negative number")1 -
while not all(pokedex):
for k, v in pokedex.iteritems():
if v:
feelings = get_satisfaction()
else:
pokemon = find_em()
try:
new = catch_em(pokemon)
except PokemonEscaped:
continue
else:
pokedex[k] = new
feelings = get_satisfaction() -
i can never understand the theme behind kotlin.
THEY DON'T HAVE A FUCKING TERNARY OPERATOR!!![?:]
Like before realizing this, i thought yeah jetbrains has decided to make android development a privileged hobby and non beginner friendly , so its now creating an encoding like language, in the false theme of " reducing code size"
But now they remove WORLDWIDE KNOWN, OPTIMIZED , EASY TO READ AND USE AND UNDERSTAND FEATURE of ternary operator and replacing it with less powerful but same looking elvis operator.( and stating that using if else for that is a better option)
Like why? if your goal is to make a shitty encoding language that makes everything shorter and most of the things optional, why remove the already efficient if else encoder?
God knows when this stupid language is going to stop my brain from getting blasted11