‘Acquire a certification in technology X‘ | ‘Earn a Domain Y certification‘
Do one of those statements list in your yearly goals ? It is almost certainly a bad idea. Let me explain why. I knew a company that required its employees to be acquire at least one certification on a technology per year. Its employees would work hard throughout the year and during appraisal time it is not uncommon to hear this converation
Foo: ‘Dude did you take that certification you were supposed to ?’
Bar: ‘Rats ! I didnt realize it was a part of our goals’
Foo: ‘hmm… what do we do ? John has already passed it and that puts him ahead of us’
Foo and Bar will probably end up reading real exam questions (also referred to as brain dumps) and passing the exam with only a day’s worth of preparation. That another way of saying ‘They cheated’. This hurts everyone.
Java’s side that is not too well known would be its interface with external devices. Java can read bar codes interface with serial / parallel ports , and communicate with a web cam (JMF)
Speaking of webcams, the following snippet in the Java media framework (JMF) should list your webcam as a device
Vector info = CaptureDeviceManager.getDeviceList(null);
The problem is that this piece of code does not work all the time. Your webcam should be compatible with JMF to be listed by this call. The gstreamer API can come to your rescue should the JMF call fail. Here is how the gstreamer API describes itself
GStreamer is a library for constructing graphs of media-handling components. The applications it supports range from simple Ogg/Vorbis playback, audio/video streaming to complex audio (mixing) and video (non-linear editing) processing.
Jconsole and visual VM help monitor java applications in any environment. Here are a few additional details that can help you monitor your java applications better
Jconsole and permissions:
Jconsole lists the PIDs of local java applications when you start it. But what if there are java applications that are running under a different user ? Jconsole will not display those java PIDs that do not belong to the user who started Jconsole. The JConsole FAQ lists a few troubleshooting tips to get around this problem. You can alternatively expose the Jconsole connection through a remote port using the -Dcom.sun.management.jmxremote.port property. Securing the remote JMX URL with a username and password should do the trick.
Viewing Jconsole / JMC Beans with VisualVm:
Developers on the web increasingly deal with remote APIs. SOAP Web services / REST rest services are consumed by a myriad of consumers. What format this communication should be carried on is a matter of debate. Each format has its own pros and cons. Inevitably any format that is sent / received from the service needs to be serialized and deserialized. There is a cost associated with this process and the bulky nature of payloads (XML is pretty verbose for example) becomes a factor too. To address these problems you can switch to alternate formats such as google protobufs
and message pack
Pros of using custom formats:
- A lighter payload
- Better serialization / deserialization performance
- Payload is not verbose
- Lack of tooling / plugins can be a cause for concern
- Debugging the format over the wire can prove troublesome
How would an email server go about identifying spam email ? The problem is an interesting one. The challenges towards identifying spam are…
1. Scaling any solution to thousands of emails
2. Identifying spam even when there are small changes to the spam content
3. Reducing false positives
One solution could be to identify a hash for the spam message and compare the hash with the hash of a new message. The problem with this approach is that minute changes in a message can result in a different hash. A fuzzy hash (Context triggered piecewise hash (CTPH)) solves this by calculating hashes based on a trigger point in the text. Hash values are calculated for pieces of the text, delimited by a trigger. For example the trigger for the following text could be ‘a’ and ‘or’
why would a lazy sunday be greeted with sleep. or was I wrong? You were not sleeping ?