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

SEARCH KEYWORD -- Writing



  C++ : string beginWith and endWith

C++ is an very powerful programming language. It is efficient and flexible. When writing C++ programs, we may often need to process strings and often we need to check whether a string begin with some substring or end with some substring. We can use following functions to ahieve these:     static bool beginWith(const std::string str,const std::string needle){        return (!str.compare(0,needle.length(),needle));    }    ...

   C++,beginWith,endWith,     2012-08-31 06:53:44

  Macro vs. Micro Optimisation

So there's recently been a bit of hype about another Colebourne article: http://blog.joda.org/2011/11/real-life-scala-feedback-from-yammer.html I'd like to respond to a few points he makes. First - You should evaluate Scala and pay attention to its benefits and flaws before adopting it.  Yes, there are flaws to Scala.   Working at typesafe makes you more aware of some of them.  We're actively working to reduce/minimize/get rid of these.   In my opinion, the negat...

   Optimization,Performance,Micro,Macro,Software     2011-11-30 12:04:25

  Buffcacher

What should a ‘cache’ be? It means a lot of things, but to my mind the default programming type should be: “keep around expensive-to-generate bits of read-only data in case we need them again, or until the computer really needs that RAM for something else” I was writing a custom video editing program in Python (interesting choice of language for that problem) and I wanted to cache decoded frames; but I just wasn’t happy with the memory management of explici...

   Buffer,Cache,Web browser,Memory,RAM     2012-02-24 05:10:10

  Stub Mixlib::ShellOut and shell_out in Ruby unit testing

Unit testing is part of software development to ensure the tiny component of a function can work as designed. Different frameworks and tools can be used to run unit testing for different programming languages. In Ruby, one popular unit testing framework is Rspec, or Chefspec if you are writing Chef recipes. While writing Chef recipes, some low level commands(DOS commands or shell commands) need to be executed on the managed resource to perform actions or gather information. For example, lis...

   RUBY,UNIT TESTING,RSPEC,CHEFSPEC,SHELL_OUT     2016-11-11 00:14:46

  Advice on improving your programming skills

Programming is cool. But behind the scenes it's also difficult for many people. Many people are defeated at the early stage of learning programming. When you are not so familiar with programming, you may find you don't know where to start and what to start with first and where to apply the knowledge. Once you go though the tough period of the learning phase, you will find a whole new world. Below are some advice which can help you improve your programming skills quickly. Write more code.  T...

   Programming,Advice     2014-02-21 08:59:04

  Why Outsourcing .Net Services is a Growing Trend?

IT companies are focusing more on .net for application development. This is because; the .net platform empowers developers with a wide range of tools and libraries to create diverse applications in an easy and efficient manner. The dot net framework allows users i.e. developers, to design and develop applications that can interact with web services and a range of online devices. .Net programming language is richer than others in many contexts. It has several objects oriented features like proper...

   dot net services, outsourcing, .net, framework     2014-10-23 22:30:43

  I don’t like the Ruby 1.9 hash syntax

There, I said it, I don’t like it. And I don’t know why you do either. I assume you like it anyway, everyone else I talk to seems to. My heart sank over and over again whilst I was at the recent RailsConf and saw respected rubyist after respected rubyist using the new Ruby 1.9 hash syntax in their presentations. I just don’t get it. But I’m not one to just moan. I plan to justify my feelings. Then maybe you can tell me why you do like it? My friend the hash rocket I ...

   Ruby,1.9,Hash,Feature     2011-12-14 07:05:09

  STOP WRITING GOOD CODE; START WRITING GOOD SOFTWARE

Good software trumps elaborate code. And unfortunately, you can’t usually have both. The real world has deadlines and ship dates. It’s a game of pick two:Ship on timeShip with elaborate codeShip with a fantastic productAlmost always, you should pick the first and the last when you’re building software applications for users (if you’re building API’s or open source libraries for other developers, then it’s a different story). Too often I have seen de...

   Good software,Standard,Good code,Deadline,Tradeoff     2011-11-20 06:56:06

  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 ...

   App,Web app,Future,Difference     2011-12-14 07:10:43

  How to Understand and Use nil in Golang Correctly?

In Golang, nil is a predefined identifier that carries different meanings in various contexts, but typically represents "none", "empty" or "zero value". It can be assigned to variables of pointer, slice, map, channel, function, and interface types. Understanding the significance of nil is crucial for writing robust Go programs, as mishandling nil can lead to unexpected issues. nil in Pointers In Go, pointers are a fundamental type that stores the memory address of a variable. When a pointer is d...

   FUNCTION,SLICE,MAP,CHANNEL,GOLANG,NIL     2024-01-05 05:19:40