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

 ALL


  Behavior of defer function in named return function

In Go, there is a special concept of named return value in function where a returned value can have name. For example, below is a named function in Go.func returnNamed() (i int) { i = 1 return}When the function returns, the return value i will have a value of 1. Also, Go has a concept of defer which will execute a function just before the calling function exits. This is similar to what finally block does in other languages such as Java. For example, a defer function can befunc deferFunc() { defer func() { fmt.Println("In defer") }() fmt.Println("Start")}Both return and defer can change th...

3,830 0       GOLANG DEFER NAMED RETURN DIFFERENCE


  Understanding database, instance and schema in Oracle database

Oracle database is the most popular database system among enterprises. To start working on Oracle database, some concepts must be understood first. They include database, instance, schema and user etc. And among these concepts, some have different meanings from those in other database systems such as MS SQL, MySQL, DB2.On the web, there are already some good posts which explain different concepts such as Ask Tom's database vs instances, Difference between database vs user vs schema. In this post, these concepts with be summarized based on real application development experience.Database : A co...

38,916 2       DIFFERENCE DATABASE ORACLE DATABASE INSTANCE SCHEMA USER


  Should we use Abstract class or Interface?

When we write programs, we may often get into a situation where we don't know whether we should use Abstract class or Interface when we want to define an abstract object. These two are very similar and they are interchangeable in many cases. On Stackoverflow, this question is asked lots of times and it's related to many programming languages. Also in the official documentation of PHP regarding the Abstract class and Interface, people are arguing about this. To understand this question, their differences and use scenarios need to be understood first.Abstract class and Interface structureFor Abs...

21,599 5       COMPARISON OOP DIFFERENCE INTERFACE ABSTRACT CLASS


  The Day Programmer vs. The Night Programmer

This post is a slightly edited form of an e-mail that I sent around internally last year. But it was suggested to me recently that I post it up to my blog to see what people think – am I right or wrong?Over the years I’ve come to the belief that there are two kinds of programmer in the world, no matter what technology they work with, lets call them:        1. Day Programmers        2. Night ProgrammersNow – day programmers are the most prevalent in this industry, and you find them mostly in organisations...

4,638 0       PROGRAMMER DAY PROGRAMMER NIGHT PROGRAMMER DIFFERENCE


  Application vs Database Programming

A few years ago, I had a problem.  A database routine for processing bulk payments for LedgerSMB that was humming along in my test cases was failing when tested under load with real data prior to implementation.  Some testing showed that while it ran fine with small numbers of inputs, it eventually slowed way down as the number of inputs rose.  Andrew Sullivan, who was also on the project through a different company, suggested it was something called a "cache miss" because I was running through a loop, inserting two rows, and then updating a different table.    Al...

3,556 0       COMPARISON DIFFERENCE APPLICATION PROGRAMMING DATABASE PROGRAMMING


  When to use STDERR instead of STDOUT

Every process is initialized with three open file descriptors, stdin, stdout, and stderr. stdin is an abstraction for accepting input (from the keyboard or from pipes) and stdout is an abstraction for giving output (to a file, to a pipe, to a console).That's a very simplified explanation but true nonetheless. Those three file descriptors are collectively called 'The Standard Streams'.Where does stderr come from?It's fairly straightforward to understand why stdin and stdout exist, however stderr seems like the odd one out. Why do we need another stream for errors?This is a quote from Doug McIll...

5,153 0       UNIX STDERR STDOUT DIFFERENCE


  Java API vs Framework

What is the difference between a Java Library and a framework? The two concepts are essentially important for a Java developer. The most important difference between a library and a framework is Inversion of Control. It means that when you call a library you are in control. But with a framework, the control is inverted: the framework calls you. (This is called the Hollywood Principle: Don’t call Us, We’ll call You.) This is pretty much the definition of a framework. Basically, all the control flow is already in the framework, and there’s just a bunch of predefined white sp...

8,184 0       JAVA FRAMEWORK DIFFERENCE API LIBRARY


  Apps and web apps and the future

Dave Winer: Why apps are not the future:The great thing about the web is linking. I don’t care how ugly it looks and how pretty your app is, if I can’t link in and out of your world, it’s not even close to a replacement for the web.Let’s set aside one thing right away. The browser is an app. Text editors, outliners, and web servers are apps. And, without them, there’s no web at all.Somebody has to write these things. That implies APIs and more tools that are also apps. It implies an entire ecosystem of apps that are absolutely vital to the web.I think Dave is...

3,585 0       APP WEB APP FUTURE DIFFERENCE