Hah
First, it’s worth noting that Java effectively invented the checked exception (clearly inspired by C++ exception specifications and the fact that C++ programmers typically don’t bother with them).
~ Thinking in Java
First, it’s worth noting that Java effectively invented the checked exception (clearly inspired by C++ exception specifications and the fact that C++ programmers typically don’t bother with them).
~ Thinking in Java
“A true PHP programmer will manage to write a PHP program in any language.”
Only Stroustrup could design an operator that signals failure by returning a special value in one case and throwing an exception in another.
Recently, I went to package the JuffEd text editor for Ubuntu (it’s on REVU now), and I was surprised that it used bundled Tango icons by default. Then I looked at the code and saw that support for XDG icon themes was really hackish, and didn’t work with inherited themes such as gnome-colors flavors.
It’s strange that support for “stock icons” is not in Qt, unlike GTK, but still, I’d like non-KDE Qt applications to support them properly. So, yesterday, I wrote a small library to properly implement the icon theme specification.
If you’re writing a Qt application dealing with icons, there are two classes of note in that library:
* XdgIconManager keeps the list of themes installed in the system, and returns themes by human-readable names or directory names, or the user’s default theme.
* XdgIconTheme looks up icons by names such as document-new and returns the full path to the file. If used from GUI applications, it can also return a QPixmap, rescaled to the required size if there is no exact match.
IntelliJ IDEA 9, codenamed… Maia? I am amused.
[whistles and opens Eclipse]
”...be conservative in what you send.” A lot of software works by that principle, and I like it. It makes sense: while you have no control over what you receive, you have control over what you send. My ideal data converter would be one that takes all kinds of weird malformed inputs and produces (e.g.) valid standardized XML.
This is why I find myself writing constructs like:
public static SortedSet
intersectWithDisjointSet(Collection extends TimeSpan> spans) { ... }
I apply this principle to human relations as well. I give people a lot of leeway in what they are and how they act, as long as they stick to two basic principles: (a) assume good faith, and (b) don’t be a pillock. It isn’t easy to shock me. While on the other hand, I have a strict code of what I allow and disallow myself (even though sometimes I fail at following it). That’s how most people probably act, but hey.
And to raise the Mandatory Gender Topic™: this is how I treat gender identity. I see other people the way they want to be seen, as long as I don’t see any evidence that they act in bad faith, that it’s a prank or trolling attempt. However, I hold myself to higher standards. This is why I didn’t assume the Maia identity and bombarded it with doubt until I felt completely, absolutely confident that it’s not just roleplaying, and I won’t regret it later.
On an amusing note, elky thinks that transgender people and “veg*ns” [sic] are naturally predisposed towards open source by their tradition-challenging mindset, which explains the unusual concentration of both there. “Most of the women who really participate in open source are feminist leaning too; it’s the strong ones that stick through though, and their involvement has short lifespans since the burnout rate is phenomenal.”
I can already see what a pain it will be to maintain an existing application based on this atrocity of a framework.
It’s exactly like Oleg said: an application written in XML with configuration files written in Java.
When it comes to operations outside the scope of standard SQL, Oracle developers have a… strange perception of usability. Operations that should by all means be simple and intuitive often have highly counterintuitive solutions.
Question: How do I reset an Oracle sequence to its initial value?
The solution is, apparently, to use ALTER SEQUENCE to set its INCREMENT BY value to the negative of the current value, then select NEXTVAL from it, and use ALTER SEQUENCE again to set the increment value back to 1.
Really, it’s easier to just drop and recreate the sequence… Intuitive, all right.
And how do you generate SQL INSERT statements from a table in Aqua Data Studio? The answer is, obviously, to export the data to a delimited file, then re-import it, but instead of committing the changes to the database, select the “Preview INSERT statements” import method. And Stallman forbid you accidentally select different tables for export and import, because it will gleefully try to interpret the file as describing data from the wrong table, with predictable results.
Everything written below comes from personal experience of maintaining a Java CMS written by our predecessors, who gave us next to no instructions regarding that pile of code.
Object. Ensure that it can really mean BigDecimal, Long, or Integer depending on the context, even for the same class, so to actually get the number value of the primary key, you have to write something like Long.valueOf(obj.getPK().toString()).