DEV Community

Jose Tomas Gonzalez
Jose Tomas Gonzalez

Posted on

What little things make you happy while coding?

I must say refactoring code to make it look beautiful is my guilty pleasure

Latest comments (89)

Collapse
 
microbadiah profile image
GT Obadiah

echo "This post is in 3D format";
😂

Collapse
 
carlitosx profile image
Carlitos-X

Believe it or not ChillHop/LofiHipHop + Coffee = #BlissLife

Collapse
 
carlitosx profile image
Carlitos-X

Has nothing to do with coding but sure helps while building the PRETTY part of a website in CSS lol

Collapse
 
randelramirez profile image
Randel Ramirez

Seeing the application work and be built piece by piece. Being able to write code using design patterns and writing unit tests, and see good coverage.

Collapse
 
jeroka profile image
Esteban Rocha

I must say refactoring code to make it look beautiful is my guilty pleasure

+1 on this!

Collapse
 
antonrich profile image
Anton

The clicks I get when I understand what I discovered.

Collapse
 
slavius profile image
Slavius

Making my code read like a book?

Something like:

if (User.hasBirthdayToday()) {
  var banner = createBanner() {
    position = BannerPosition.Top,
    message = User.isOlderThan(18) ? getBeerBanner : getSodaBanner,
    backgroundColor = Color.NavyBlue,
    displayForSeconds = 15
  };
  banner.Show()
}

Instead of spaghetti code:

DateTime today = DateTime.Now;
bool userHasBirthdayToday = 
  User.DateOfBirth.Day == today.Day && User.DateOfBirth.Month == today.Month;

if (userHasBirthdayToday) {
  string messageType = "BIRTHDAY_SODA";
  if (today.Year - User.DateOfBirth.Year >= 18) {
    messageType = "BIRTHDAY_BEER";
  }
  string bannerMessage = Banners[messageType]?.getMessage();

  Banner b = new SiteBanner(BannerPosition.Top, bannerMessage, Color.NavyBlue, TimeSpan.Seconds(15));
  b.Show();
}
Collapse
 
malgosiastp profile image
Malgosia

I just love when I learn some trick or new feature or concept in some basic tutorials or article, and then one day working, I run into situation and realize that I can actually use it in my project (or it even solve some big issue) :)

Collapse
 
erebos-manannan profile image
Erebos Manannán

Getting my team to use new tools I built to make them more efficient. Be that classes that help accomplish some repetitive thing, better CLI tools, some sort of CI automation, or whatever.

Collapse
 
tobiassn profile image
Tobias SN • Edited

Getting an error. It makes me happy that I have this opportunity to learn about what I did wrong and improve. And then when I’ve fought through them all, it feels so good when it works.

Collapse
 
lukaszkuczynski profile image
lukaszkuczynski

what do you mean saying "Gering" ?

Collapse
 
tobiassn profile image
Tobias SN

Oh sorry I mean ‘Getting’.

Collapse
 
courier10pt profile image
Bob van Hoove

Finding a library like Polly. It provides a variety of resilience strategies in a composable way. Think of retry, fallback, circuit breaker etc. The documentation is excellent.

It made me happy because it allowed me to deliver a much better quality solution than I could have rolling my own, especially 'within scope' for the task at hand.

Collapse
 
layzee profile image
Lars Gyrup Brink Nielsen • Edited

1) Automated testing and linting in a neat DevOps pipeline 🤤🤤🤤
2) I have not looked back since I started using the Microsoft Sculpt Ergonomic Desktop kit 3½ years ago.
3) 2 pivoting monitors with one in portrait mode. Each at least 27" and 2560x1440.

Collapse
 
maxwell_dev profile image
Max Antonucci

Feeling all smart and professional. Much of my life had me feeling looked down on by people older than me. Being in control of complex code and in the flow of all the knowledge and information makes me feel like someone worth taking seriously :)

Collapse
 
lmbarr profile image
Luis Miguel

Finding a bug after hours of looking up for it.
Finding a big after a really short time of looking for it.
Guessing by a first attempt what a code (not mine) does.

Collapse
 
mmarinez20 profile image
Manuel Mariñez

It can be pretty basic but what I love the most is running that heavy, bothering and complicated problem I had working smoothly.

Collapse
 
cjbrooks12 profile image
Casey Brooks

Lining stuff up vertically. Whether it's the values in key->value literals, wrapped method parameters, class members, or anything else, everything is just so much nicer to look at when it's all lined up vertically.