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

 PROGRAMMING


  A plugin to update last_error in Delayed Job

delayed_job is a process based asynchronous task processing gem which can be ran at background. It will fork the specified number of processes to execute the tasks asynchronously. The task status is usually stored in the database so that it can be easily integrated into a Rails application where asynchronous job execution is desired.Normally when a job fails to execute or error occurs, it would save the error into the database with the column last_error. Ideally all these will be handled by the delayed_job gem itself, we no need to worry about anything. However, in some extreme cases, we ...

3,760 0       RUBY RUBY ON RAILS DELAYED JOB LAST_ERROR


  Want to be a programmer? Top programming languages that will be result driven in 2017

Programmers are always high in demand in software industry: take any corporate blue chip Software Company India for instance; programmers are playing a pivotal role in company’s business and relevant growth. In that case if you are planning to pursue a programmer’s career and earn fat package, here goes the range of option for your further study.Alternatively, if you are an employer and you want to understand the basic idea of coding, the outline description of popular programming language will give you extra leverage for doing recruitment, coordination with your team, etc. Ja...

2,193 0       JAVA SOFTWARE OUTSOURCING INDIA PROGRAMMERS


  The basics of Client/Server socket programming

 While Client/Server communication model is ubiquitous nowadays, most of them involve socket programming knowledge. In this post, I will introduce some rudimentary aspects of it:(1) Short/Long-lived TCP connection.Short-lived TCP connection refers to following pattern: Client creates a connection to server; send message, then close the connection. If Client wants to transmit information again, repeat the above steps. Because establishing and destroying TCP sessions have overhead, if Client needs to have transactions with Server frequently, long-lived connecti...

3,097 0   


  Use pdb to help understand python program

 As I have mentioned in Why do I need a debugger?:(3) Debugger is a good tool to help you understand code.So when I come across difficulty to understand vfscount.py code in bcc project, I know it is time to resort to pdb, python's debugger, to help me.The thing which confuses me is here:counts = b.get_table("counts")for k, v in sorted(counts.items(), key=lambda counts: counts[1].value): print("%-16x %-26s %8d" % (k.ip, b.ksym(k.ip), v.value))From previous code:BPF_HASH(counts, struct key_t, u64, 256);It seems the v's type is u64, a...

1,254 0   


  Be careful when running knife vault command

While using Chef, one would frequently use knife commands which are used to manage resources on the Chef server. One can list all nodes, data bags, vault items and many other stuff on the Chef server. In this post, we would cover one command which may need your attention when using it -- knife vault.On Chef server, one can store data to data bags which can be accessed by registered clients. These data bags usually store the data in plain text format. In some cases, one would need to store data secretly on the Chef server, Chef provides the encrypted data bag which uses a shared symmetric secre...

7,476 0       CHEF KNIFE VAULT KNIFE DATA BAG CHEF-VAULT


  How to maintain a software project?

For a software engineer, at least from my own experience, maintaining an existing software project would take up a considerable amount of time: adding new features, fixing tricky bugs, and so on. In this post, I will share some some tips about how to become a veteran from a novice quickly when facing a new project.(1) Get familiar with the background knowledge of the project.Every software has its own purposes and users: a device driver serves the specified hardware, whilst a SMS gateway helps routing the messages all over the world. So before delving into the code, you should get an overview ...

2,768 1   


  Why do I need a debugger?

 When I begin to learn a new programming language, I will try and master the debugger for it as early as possible. For example, in 2013, while I touched the Go, there seems only gdb for use. Although gdb itself is not a good choice (From Debugging Go Code with GDB):As a consequence, although GDB can be useful in some situations, it is not a reliable debugger for Go programs, particularly heavily concurrent ones. But at that time there was no other choice. So after delve came out, I switched to it without hesitation. Though I am not an expert of delvecode, I still try m...

2,751 1   


  Handle NXDomain error when resolving IP address in Ruby DNS resolver

In another post, we covered how to resolve SystemStackError when resolving IP address in Ruby. In this post, we would cover another common issue where a NXDomain error is returned when resolving an IP address. The NXDomain error means that the queried domain name does not exist in the DNS.In Ruby, DNS resolver library will use /etc/resolv.conf by default get the name servers to resolve the domain name. There are multiple DNS name servers can be specified in /etc/resolv.conf with below format.nameserver nameserver nameserver ...By default, only the top MAXNS name servers(3 in Linux by...

4,241 0       RUBY RUBY ON RAILS NETWORK DNS NXDOMAIN