Tag Archive for 'Java'

Programming exercise: maximum value in integer array, part 1

This exercise is just a little bit more substantial than the last one — but not by very much. Given an array of \(n\) non-negative integers, find the maximum value in the array, or return \(-1\) if the array is empty. Obviously, the use of any built-in maximum-finding function is forbidden. While the problem is almost trivial, it does illustrate how each language works with array or vector data types, as well as how it handles iteration.

This exercise, like some of the other ones that I will also be going through, is from the book Programming Interviews Exposed by John Mongan and Noah Suojanen[1]… » [Expand post] [Permalink]

0 Comments

Programming exercise: Hello, world!

As a preliminary exercise to jog my memory, here is the obligatory “Hello, world!” program in a variety of languages. On the one hand, the programs do nothing except output a string, and so don’t illustrate very much about the respective languages. On the other hand, the simplicity of the task does illustrate the difference between languages that allow you to begin coding right away versus those that require a considerable amount of setting up (importing libraries, declaring classes, etc.) before you even have a functioning program… » [Expand post] [Permalink]

0 Comments

Mock-up of a Yudit-like mobile application

One application that I always look for in a mobile device is a multilingual dictionary. If one is not available, I can make do with support for multiple input methods (such as through SCIM), access to the internet, and a decent web browser (one that handles non-Latin fonts and right-to-left scripts).

I often end up using a program called Yudit, a Unicode editor written by Gáspár Sinai, even on a system that has native integrated support for multiple input methods, because it’s available on a wide range of systems and I’m familiar with the input methods bundled with it. For example, even though the same input method is supposedly available on both Microsoft Windows and through SCIM, there may be slight differences in the keyboard layouts that can result in typos if one is not careful.

It seems that the majority of wireless handheld devices ship with only one input method. Yudit does not appear to run on any of the major mobile operating systems… » [Expand post] [Permalink]

No related posts.

0 Comments