2020 has been a wild year, and it's almost over.
On Twitter we asked people to sum up 2020 in a few lines of code.
Here are some of my favorites:
Don Jones®@concentrateddon
@pluralsight Rollback-Transaction -transactionid 202020:48 PM - 30 Dec 2020
Kushal@kushalseth14
@pluralsight api.years.com/get/2020....
Console error: 404 not found
api.years.com/get/2021... 200 status code..20:05 PM - 30 Dec 2020
Saeid Yazdani@saeidkalhor
@pluralsight imagine this in a bash script (to make it like a code lol):
rm -rf /plans; sleep 365*24*3600;18:04 PM - 30 Dec 2020
Arnold Smith - Lab Every Single Day!@arnold_smith1
@pluralsight if (year === 2020) {
console.log("Year 2020 can go to hell.");
} else {
console.log("Keep grinding; Keep hustling and keep the faith!!!");
}
#100DaysOfCode #100daysofcodechallenge #100DaysOfCloud #longlivepluralsight #pluralsight23:47 PM - 30 Dec 2020
Kindred@skywhiterose
@pluralsight If(pandemic == true){
Hording minion = new Hording("Walmart", budget)
if(budget == 0){
Twitter.post(Cry.me.a.river); return;
}
while(budget > 0){ minion.buy("every freaking roll of toilet paper", budget--);}}}04:31 AM - 31 Dec 2020
Afsal Thaj@afsalt2
@pluralsight def tryAgain(currentTime: DateTime) =
if (currentTime.getYear > 2020) {
println("Ah. Just get this over!")
tryAgain(DateTime.now)
} else {
println("Happy days.. Hopefully")
}00:05 AM - 31 Dec 2020
Edwin Beltran@ebeltran81
@pluralsight var vaccineRace = Task.WhenAny( this.pfizerVaccine(), this.modernaVaccine(), this.oxfordVaccine() ); do { this.nonSense(); this.crazyPoliticians(); this.seeHumansLosingTheirHumanity(); this.seeScienceBeingTwisted(); } while(!vaccineRace.IsCompleted);19:46 PM - 30 Dec 2020
Sumit Sahni@sumitsa79015407
@pluralsight Hope one day condition of vaccine will false 😁
if(vaccine=0; vaccine<=covidVaccine; vaccine++) {
console.log("Stay home stay safe, vaccine not yet came");
}
else{
console.log("Victory over Covid-19");
}
@pluralsight03:53 AM - 31 Dec 2020
@pluralsight var year = DateTime.Now.Year.ToString();
If (year == “2020”){
throw new InvalidOperationExceptiond("Year cannot be read");
} else {
Console.Write(“Happy new year”);
}21:30 PM - 30 Dec 2020
Add yours!!
FX Lemire@fxlemire
@pluralsight ```javascript
const wasMessedUp = 0.1 + 0.2 !== 0.3;
console.log(`2020 was ${wasMessedUp ? '' : 'not '}messed up`);
```18:50 PM - 30 Dec 2020
otorinolaringolog@bppzsk
@pluralsight function someFunc(x, y) {
return x + y
}
someFunc(2, 3, 4);
Works, but is just nonsense 🙂19:06 PM - 30 Dec 2020
![]()
![]()
crouchingTiger(); 🏴@dbl4k
@pluralsight var duration = TimeSpan.FromDays(14);
var lockdown = true;
while(pandemic)
{
If(lockdown)
DoLockdown(duration);
else
OpenEverythingUp(duration);
lockdown =! lockdown;
duration = duration.AddDays(7);
}
#100DaysOfCode #coding #csharp17:54 PM - 30 Dec 2020
Mohamed Lemine AY@wellcherve
@pluralsight var year = Year(2020)
return if(year.isFinished) {
year = Year(2021)
year.initiateBigGoals()
}
#Kotlin18:49 PM - 30 Dec 2020
C E E J Λ Y✪@itsvwede
@pluralsight let year = 2020;
let day = 01;
while(year <2021 && day < 365)=>{
throw new AppError("Living Hell", 500);
day += 1;
}19:26 PM - 30 Dec 2020
Reza Salehi@zaalion
@pluralsight Pandemic.IsOverEvent.RegisterCallback(Redo2020);18:26 PM - 30 Dec 2020
The_Illest_Manu@barracoder
06:41 AM - 31 Dec 2020
Sachin B@sachinbee
@pluralsight let year = 2020;
try {
if (year === 2020) {
throw new Error("This year will be under lockdown. Kindly stay indoors, wear a mask and frequently wash your hands. Frustration is guaranteed.");
}
} catch (error) {
console.error(error);
}21:50 PM - 30 Dec 2020
Ackermann Yuriy 🇳🇿🇦🇪🇪🇺@herrjemand
@pluralsight you@2020: ~$ sudo rm -rf --no-preserve-root /17:51 PM - 30 Dec 2020
So what do you think?
What code snipped best sums up 2020?
Add your tweet here or in the comments!!
Photo by Godisable Jacob from Pexels
Discussion (0)