Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Lazy



  I’m too lazy to be a HTML developer

There’s no denying it. I’m just to damn lazy to be an HTML developer. This really sunk in when I looked at a tutorial for doing a jQuery Lightbox – for a client project. The tutorial was titled “Super Simple Lightbox with CSS and jQuery” but after reading it over I thought a better title would be “A really freaking hard tutorial on the inane intricacies of doing something that looks simple but in reality is a skein of HTML, Javascript and CSS that no...

   Web design,HTML,JavaScript,Complexity,Messy     2011-12-18 10:42:45

  Why Good Programmers Are Lazy and Dumb

I realized that, paradoxically enough, good programmers need to be both lazy and dumb. Lazy, because only lazy programmers will want to write the kind of tools that might replace them in the end. Lazy, because only a lazy programmer will avoid writing monotonous, repetitive code – thus avoiding redundancy, the enemy of software maintenance and flexible refactoring. Mostly, the tools and processes that come out of this endeavor fired by laziness will speed up the production. This ma...

   Good programmer,Lazy,Reason,Dumb     2012-04-18 07:15:23

  Singleton Pattern in Golang

Singleton pattern is the simplest design pattern in software design. It ensures that only one instance of an object exists globally, regardless of how many times the object is instantiated. Based on the characteristics of the singleton pattern, it can be applied to scenarios such as global unique configuration, database connection objects, file access objects, etc. In Go language, there are multiple ways to implement the singleton pattern. Today, let's learn together about some of these approach...

   GOLANG,SINGLETON PATTERN,TUTORIAL     2023-08-18 23:52:05

  Friday is my new Saturday

This term I've happened to have Friday off, but I'm suppose to teach on Saturday. I might sound slightly frustrating for 9to6 folks, but It's not uncommon for University teachers, when you have a lot of holes in your teaching schedule. However, i do a lot of research without weekends, but this is only because i do love it.Nevertheless, This simple shift of working days has made me way happier and relaxed. I don't know the reasons, but here are my observations about it: You can sleep more an...

   Life,Balance,Explore,Rest,Advice     2011-10-28 10:41:22

  Method chaining and lazy evaluation in Ruby

Method chaining has been all the rage lately and every database wrapper or aything else that’s uses queries seems to be doing it. But, how does it work? To figure that out, we’ll write a library that can chain method calls to build up a MongoDB query in this article. Let’s get started! Oh, and don’t worry if you haven’t used MongoDB before, I’m just using it as an example to query on. If you’re using this guide to build a querying library...

   Ruby,Method chaining,Lazy evaluation,Implementation     2011-11-29 08:51:17

  Interesting Hello World

Hello world is the beginning of everything. When you first learn a new programming language, the first program you write is to print the "Hello world" string on the console with that language. For example: So who invented "Hello world"? It's Brian Kernighan, a canadian computer scientist and author of The C Programming Language and The Unix Programming Environment. In his books, he used to write "Hello world" which changed the whole world. Also programmers like to use foo and bar as variable n...

   Programming,History     2013-08-29 11:31:00

  The several flavors of random in Java

Random number generation is one of most basic features in any programming language. The basic utilization is always the same: generate a random number between 0 and 1. With such a simple resource at hand we sometimes overlook some interesting features. What do we learn from the books? The most obvious and maybe intuitive way to generate random numbers in Java is simply calling: java.lang.Math.random() Random generation is in the Math utility class with abs, pow, floor...

   Java,Random,Thread,Math,Type     2012-03-22 14:17:44

  What do programmers like to say usually?

Coding is an very important part of programmer's daily work. But beyond coding, programmers need to do other work as well, they need to fix bugs reported by users, they need to write documents for their codes. Also, they often need to answer questions from customers, bosses and colleagues. What do they often say when they are facing different sort of questions? Today we share some. It's done. I just need to clean up a few things. This is hacky, but I'll fix it soon. This can never happen: It's ...

   Programmer,Execuse,Bug     2013-08-07 07:38:30

  Singleton Design Pattern in Java

Singleton is frequently used in applications where resource may be expensive to create and no instance specific state needs to be maintained. For example, when creating database connection, a singleton may be needed. Today we will share the famous Singleton design pattern in Java. 1. Definition Singleton design pattern is a design pattern that restricts the instantiation of a class to one object. It is one of the most well-known design patterns. 2. Application Singleton ...

   DESIGN PATTERN,SINGLETON,MULTITHREAD,JAVA     2020-04-11 02:16:28

  Image lazy loading plugins on Github

Image lazy loading is a concept where images are getting loaded only when needed. It has been adopted in many web applications to reduce usage of bandwidth. When a web page is loaded in a web browser, not all the page elements would be visible in the view port, hence those resources(images, videos etc) don't need to be loaded.  Currently there are quite a few open source plugins on Github which can help achieve image lazy loading. Today we will introduce a few of them. Echo.js Echo.js is a ...

   JAVASCRIPT,OPEN SOURCE,WEB DEVELOPMENT,IMAGE LOADING     2017-04-22 01:16:04