Thanks, everybody. It's given me some ideas and insights. It's a daunting task, but I now have a clearer picture of what I should be focussing on.
Posts made by Severity_One
-
RE: Fixing a stubborn application?
-
Fixing a stubborn application?
Hi,
I wrote about this in 2019: https://what.thedailywtf.com/topic/26795/stubbornness?_=1620023285426
But now, I'm actually making an effort to finally go and fix the issues. The old adage goes "if it ain't broken, don't fix it", but the application is essentially unmaintainable. It's written as a Java Swing application, so no way that you can run it as a modern web-based application.
What I'd like to do is throw away all the front-end code, and replace it with a Vue.js front-end with a REST-based Java/Spring Boot back-end. The business logic can stay largely the same, as can the entity classes which is important.
The big problem is how the application is built. I've identified quite a few anti-patterns, and the most important are these:
- Inner platform effect/not invented here/re-inventing the (square) wheel
- Singleton pattern/God object
- Inheritance over composition (can't touch one thing without affecting everything else)
It's especially the Singleton pattern that's killing me. To give an example, this is a financial application that can work with different currencies. There's also a base currency, but the check to ensure that the correct currency is used for the area that the application runs in. For example, the application runs in Mexico and uses pesos. This check takes place in the entity class, which then makes a call to a static method in the Configuration singleton object. I'm all for a rich domain model, but this is just problematic.
Rather than looking for a solution, what I'd like to know is whether somebody has been in a similar situation, what their approach was, and what they found worked, or didn't work so well. So that maybe I don't go down some rabbit hole.
-
Stubbornness
It's been quite a while since I visited here, but I wanted to share a story about one of my predecessors at work. I've never known him personally, and this story does not have a happy ending – which is often the case on TheDailyWTF, but this time, not in the way you'd probably think.
So the title of this is "stubbornness". You probably know the type. who believe that their way is not only the best; nay, it's the only way. Like I said, I've never known him, but his code tells me a lot about him.
He did everything himself. Security system? Check. Logging framework? Ditto. Have a standard component in Java Swing? He'd subclass it.
The application that he wrote and that I'm maintaining is impressive from a functional point of view, but the way it's been developed... oh boy. Composition over inheritance? Uh-uh. Avoidance of static variables? Nope. Using Spring framework? That would mean using an industry standard, so nope, sorry.
I'll fix it, but it'll take time.
The story doesn't end there, though. His stubbornness went further than just programming. One day, he had a motorcycle accident. He survived, and in fact went back to work. But his colleagues saw him fading away.
Now, we have universal free healthcare where we live. But there are budget constraints, waiting lists, etc. So they told him, look, you have a private health insurance. Why don't you go and see a private doctor? No, he said, if the system fails, I want to show that it fails. So he went to see a specialist every three months, they didn't find anything, and sent him on his way.
Eventually, six months after the accident, he went to see a private doctor. This doctor told him that he knew exactly what was wrong, and wanted him to visit hospital in a week's time.
He never made it to that appointment. He died.
And when I look at his code, I can completely understand it. This must have been a person who was either incapable or unwilling to look further than his own set of beliefs.
I don't really want to put a conclusion or a moral to this; all in all, it's just sad. And all the more sad, because it was avoidable.
The only thing I can say is: you're not the best programmer in the world. If you want to become better, use what is shared, and share by yourself.
-
RE: Is it something in the water?
Maybe for the 2020 vote, there should be a party who's main policy is to reduce idiocy in the UK, even if that means just shipping them off to another country. I'd vote for them.
They already did that, starting with the Mayflower.
-
RE: What's a VAT?
Living in a country of just over 400,000 inhabitants, it's a bit silly to have to fill in a state, county (thank you Brits) or region (Germans like that). I usually fill in the name of the particular island I live on, but Maltapost can actually tell from the postcode which island that is. Or from the town name. Or because they know my father-in-law.
-
RE: Daylight saving time
You should add <a href="http://www.youtube.com/watch?v=0zHu6XCJF60">timeImmemorial</a> for completeness.
Good point, although our clientèle from the High Middle Ages is a group somewhat limited in size.
-
RE: Daylight saving time
I think the test looks like
- Generate a failure (or series of failures?) with timestamp [currtime - 240 hours]
- Verify that the job is cancelled
But 240 hours != 10 days.
Exactly. I took 240 hours and five minutes, so you're just before the cut-off timestamp - provided you're not dealing with daylight saving time.
I've created a couple of standard timestamps for testing, including 'now', 'justNow' (five minutes ago), 'yesterday' (24 hours ago), 'nextMonth' (30 days from now), and 'whenPigsFly' (five years from now, because Oracle gets funny if you use dates later than 2031).
-
RE: Daylight saving time
Well, the thing is, this wasn't the program, but the self-integration test. It doesn't need to be so rigorous, or otherwise you'd have to write a test package for your test package.
Don't worry, I've converted everything now, and lo and behold, everything is working again. I just wish that dates and times in Java <= 7 would be a bit easier. And it's an easy mistake to make, because in your mind you think you're doing the same thing in Java as in Oracle. Which you aren't, but it isn't obvious.
-
RE: Daylight saving time
TRWTF is daylight saving time in 21st century.
It makes sense in the more northern (or southern, if you're in the southern hemisphere, although the land mass doesn't extend so far as it does with Eurasia) latitudes. The USA/Canadian border is around the 49th parallel; in Europe, that would be around Paris, or southern Germany. There are quite a few people living north of that; the whole of the UK for example.
You really don't get a lot of sunlight during the winter months. It also means that more children get hurt/killed in traffic on their way to school, which in Europe often happens by bicycle. So that makes the case for winter time.
In summer, at those latitudes it would be light from 5 AM to 10 PM, give or take, and the idea is you'd be using less electricity because you switch on your incandescent lights later. Except that incandescent lights are nowadays banned in Europe.
-
RE: Daylight saving time
And the period in March where 10 days = 239 hours.
No, because it fails after 240 hours, so also after 239 hours.
The real WTF is much simpler: yours truly. You can do SYSDATE - 10 in Oracle, and it compensates, but if you do new Date( new Date().getTime() - 864_000_000L ) in Java, things go belly up.
Yes, the deeper issue is that date handling in Java is still a complete mess, and yes, I'd probably should be using Joda Time, but still, this is something that I should have thought about.
-
RE: Daylight saving time
Nah... it's not that. And it appears that my claim about SYSDATE arithmetic isn't correct either. But it still doesn't explain what's going wrong. Quite vexing, really.
-
Daylight saving time
You'd think that, in 2014, you wouldn't have to worry about things light daylight saving time, because your computers take care of it automagically. And you'd think wrong.
Today, I spent a considerable amount of time trying to figure out why some automated tests where suddenly failing. The thing is, these are Java-plus-Hibernate self-integration tests that test a bunch of Oracle PL/SQL procedures.
One of these tests involves checking that a certain operation has failed for the past 10 days and therefore needs to be cancelled. Now date arithmetic is dead easy in Oracle: you just do SYSDATE-10. Tada, 10 days, or more precisely, 240 hours, get subtracted from the current time.
Which works just fine most of the year, except for that period in October where 10 days actually equate 241 hours.
Sigh...
-
RE: Windows 9 (And Pandora) appreciation thread
Red tape means changing the actual DNS entries takes days, and in some cases I'm testing alternatives to things and the whole point is to NOT change the DNS so I don't affect everyone else. Terrible solution.
The problem, and this isn't quite getting through to you, is that you choose convenience over security. Just like the 'su' versus 'sudo'. Yes, it's much more convenient to become root and do everything from there, but it's also less secure.
What I would be afraid of is that this preference for convenience extends to your coding style, and in that case, if I were in some way or other accountable for the quality of your code, I'd have a problem with that.
That may just be my irrational concern, but you're consistently arguing against a pretty well designed security system because it doesn't work the way you want it to work, or how things worked 10 or 15 years ago.
In some way our jobs can be moderately exciting, in the sense that you create something from nothing, and (hopefully) make your customers happy. On the other hand, some parts of being a developer consist of sticking religiously to guidelines and best practices. You need to do both.
-
RE: Windows 9 (And Pandora) appreciation thread
It is ME, the user, dealing with UAC popups when trying to do my work, like needing to edit the HOSTS file on my machine. Open the file to make a quick edit, hit save - OOPS FORGOT TO START YOUR EDITOR IN ADMIN MODE AND YOUR CHANGE CAN'T BE SAVED NOW, SUCKER. It's just a pisser. Alternative is to pin the editor shortcut with admin mode enabled, which causes the UAC popup by default. Which is exactly the thing that gets annoying after a while.
So use DNS.
-
RE: Windows 9 (And Pandora) appreciation thread
About this - there really needs to be a way to tell UAC to allow/whitelist certain things - <s>like updating an INI in the diablo folder.</s>
As a regular user at home, UAC is annoying but tolerable. As a programmer who's lazy and doesn't stick to well-documented guidelines, it makes work almost impossible because every other time I blink I am having to confirm that I wanted to blink.FTFY
-
RE: The Brighton Wheel
I have seen the English Channel at various shades of blue. It DOES happen.
Maybe I'm spoiled because I can see the Mediterranean from two sides of the office.
-
RE: The Brighton Wheel
But why in Hell's name would I want to see Shoreham fucking Power Station from Brighton Wheel?
Because it's a phallic symbol. People likes those.
Anyway, why anybody would like the North Sea or English Channel is beyond me. Unless you have a penchant for grey, of course.
-
RE: Java is a statically typed language which couldn't care less for type safety
I never even knew this interface existed. Probably why this was never generified is because (a) nobody uses it and (b) probably even Sun didn't know it existed.
-
RE: Today's Laptop Keyboards
Me, quite a lot.
Sometimes I'll get a desk when I'm in a different office with a keyboard/mouse, but if I'm at home or I'm in a meeting room or a hot desk then I won't.
As I said: asking for an injury. I have some trouble with my eyes, which means that I'm one of the two people, apart from the CEO, to have their own fixed desk in this otherwise hot-desking office. It also means that my monitor is at a decent height, whereas all my colleagues have to look down to their 22" screens. Most of them are in their 20's, so the back problems will probably come later.
-
RE: Just a simple upgrade
I'm thinking of building a new PC, specifically for gaming really. My current box has a Supermicro motherboard (was a total hassle trying to order one), an Intel Core i7 960, 6 GB of memory, a GTX580 (forgot the brand) and a 256 GB Samsung SSD. Nice little Dell 22" eIPS screen, too. I see no point in upgrading it, because it still plays current games pretty well. Perhaps not everything at ultra settings, but I don't care. And for everything else it's fast enough.
But if/when I'm going to build a gaming PC, in a small form factor to it fits neatly under the TV, it'll have a good motherboard (perhaps Supermicro again; Intel chip; Nvidia graphics card. I've been building PCs for too long to look at the price/performance ratio too closely, and in my experience it usually spells trouble if you economise on components. That's not to say that this would be one of those ultra-expensive gaming PCs with red motherboards, neon and that kind of nonsense, but good quality components that will last a long time.
-
RE: Today's Laptop Keyboards
Whoever uses the keyboard of his laptop anyway? That's asking for an injury.
At work I use a Logitech K810 Bluetooth illuminated mini keyboard. It's tiny, yet full size. No numeric keyboard, but I don't need that anyway. Can switch between my laptop, my tablet and my phone. The arrow keys are the tiny kind, but I don't find that a disadvantage.
It's also partially made of aluminium and looks sturdy enough to do some serious damage on annoying co-workers.
The only minor complaint that I have is that I had to import it from the USA, because otherwise in Europe you get a US International layout, which I don't like. Comes with having used computers since the early 80's, when US layouts were to only ones available.
-
RE: Is anyone surprised?
@Severity_One said:
can't do a backup because Samsung Kies is an utter piece of rubbish.
You're right, there isn't a base backup solution. Yet. I expect that will be fixed at some point.There are plenty of backup solutions, but none of them appear to work on my particular phone. Or at least, not very well. Kies is the most obvious example, that simply tells me "I couldn't back this and this item up", without telling me why. Others essentially require you to root your phone, which I've meanwhile done, but more to try to get rid of the wakelocks (which drained the battery like there was no tomorrow).
-
RE: Is anyone surprised?
While I'm an Android user, because I can't stand the kindergarten environment that Apple gives you, there are some areas where iOS is miles ahead of Android. Try music, for example. There's essentially nothing on Android, whereas on iOS you find apps from major manufacturers like Korg.
Also, my Galaxy S3 is now veeeery slow, I could do a factory reset, but I don't want to lose my stuff, and I can't do a backup because Samsung Kies is an utter piece of rubbish. So... there's still some improvements that they could make.
-
RE: DecomposeLine
@henke37 said:
So the code traveled back in time three years?
Um... no? The code is from 2005. Java 1.4 is from 2002.
@Fjp said:
The given code will ignore any null substrings. That is, the output resulting from "one,,,,two" is the same as the output resulting from "one,two". I think this differs from the behaviour of String.split().
That's probably an unwanted side-effect. The input file is essentially a CSV database dump from a table.
Personally, I find the .equals( null ) a nice touch.
-
DecomposeLine
Found this beauty when fixing some old code:
private Vector decomposeLine( String lineString )
{
Vector results = new Vector();
String newString = new String();
lineString = lineString + ",";
char chars[] = lineString.toCharArray();
for( int i = 0; i < chars.length; i++ )
{
String tmp = String.valueOf( chars[i] );
if( tmp.equals( "," ) )
{
if( !newString.equals( null ) )
{
results.addElement( newString );
newString = new String();
}
}
else
{
newString = newString + chars[i];
}
}
return results;
}As far as I can tell, this does a String.split, but in a far more elaborate, inefficient and plain wrong way. And whilst String.split was only introduced in Java 1.4, this was in 2002, and the code is from 2005.
This method will be replaced by Arrays.asList( line.split( "," ) ), and itself will start to decompose. An honourable mention for the person who finds all the WTFs; I'm not bothering.
-
RE: Web Service WTF
This is why I'm vehemently against off-shoring: it devalues software development.
Perhaps a better reason to be against off-shoring is because it threatens your job?
Our experience with off-shoring to India has been very positive. But we don't simply send a spec to India and use whatever comes back. We work closely together; they're in fact part of the same multi-national company,
We were the ones who chose which guys would be working for us, and their source code is checked over here, and recommendations for improvements sent back. Some of our people went over to India, and some of them came over here for a couple of weeks to learn about our way of working.
We had trouble finding qualified Java developers here, not in the least because the government had made a deal with Microsoft, so that you get mostly C# taught at university. The Indian team, on the other hand, gives us a lot of flexibility.
So sure, outsourcing or off-shoring can go very wrong, but if it does, it's probably your own fault.
-
RE: Creating a sequence in Oracle that the Finance people are happy with
Yes, it's exactly that. My first reaction was "they're all barking mad", too, but that's from an engineer's point of view.
The question "why is there no number six?" is valid. There's still quite a bit of VAT fraud in this country, and they take it seriously these days (at least a bit more serious than the time when you saw dozens of people chatting outside the VAT offices every time you drove by, until a massive corruption scandal within the department erupted).
-
RE: Creating a sequence in Oracle that the Finance people are happy with
Your finance people are morons.
Well... it's actually the auditor hired by the VAT (Value Added Tax) department. And whether it's difficult to implement is not really a concern to a non-technical person – and they're right.
-
Creating a sequence in Oracle that the Finance people are happy with
Creating a sequence in Oracle is simple enough. Creating one that the Finance people accept... slightly less so.
The issue is that these numbers must be sequential, no matter what. And whilst Oracle (or SQL in general) sequences guarantee that, there could be some issue like an exception in code, earthquake, meteor strike, Judgement Day, anything that will cause the next sequence value not to be inserted into the database. And that means a gap, and that means we're hiding something, and that means trouble.
I can't really think of anything better than acquiring an exclusive lock on the table, taking the max ID, increasing it by 1 and using that as the next sequence value. But maybe there's a better way of doing this?
-
RE: Bad casting choice
@arh said:
@morbiuswilters said:
Oh, come on. Name one example of a popular package where poor boundary checks lead to a CERT alarm every couple of weeks.Sadly, we will be seeing WTFs like this into the 2060s because C will never just die already.
This, so very very much. With all the security issues, memory leaks etc you would think by now most modern software would be written using managed code or something that makes it impossible for a out of bounds index to give you root control over the computer. But no.
Other than OpenSSL, that is.
-
RE: Am I TRWTF?
@slavdude said:
I'll be the first to admit that I suck at asking for help, but one would think that the higher-ups would begin to notice that the project schedule was slipping.
The above sentence is worrying. To me, it sounds like the situation escalated out of control, you didn't inform the relevant people, like your boss, in an e-mail (so that you have your concerns in writing).
Also, do you wait for somebody else to notice that things are getting out of control? Why didn't you ring the alarm bells before?
At your next interview, be very sure to have a good answer to questions like these. If they get suspicion that you don't communicate very well... that's not something you want to happen.
@slavdude said:
I was unable to do the work at the level of quality that I wanted to and that the company deserved because of the sheer volume of it.
This rings another alarm bell. It almost sounds that work could have finished quicker if you didn't set such high standards. What the company is interested in is that it works, not how well it's written.
Don't get me wrong: I want my software to be perfect. But there are other considerations, such a business decisions and customers waiting for their software, that you have to weigh against one another.
This is another thing you need to be able to explain away at your next interview.
@slavdude said:
I got tired of the hassle at work and resigned suddenly. Dumb or smart? You decide.
Personally, I think your decision comes from ever-increasing frustration with the whole situation. What you have to ask yourself is whether you could have prevented this situation to begin with, and what steps you can take to ensure it won't happen again.
-
RE: This is why we have super-a r s bound to (insert-random-string)
TRWTF is not having any punctuation.
-
RE: Government Shutdown
@boomzilla said:
Especially making it legal for a doctor to murder a patient.
It's legal for your governments (both state and federal) to murder inmates, although they use a differentphrase for that. So the idea that one person can legally kill another person, under specific circumstances, is not at all far-fetched. And there are very strict guidelines before a doctor can comply with the explicit request of a patient to have his life ended.
@boomzilla said:
People dare stupid things all the time. Why stop now? (I'm assuming that you don't mean "classically liberal" when you say liberal, or I would probably agree with you...Estonia comes to mind).
I'm talking about freedom in all its aspects. If you define freedom as a measure of non-interference by a government, than freedom is mostly available to those who can afford it.An overbearing government, such as favoured by socialists, leads to a more or less equal amount of freedom for everybody, but it's a freedom that is severely curtailed. If you remove most (or all) state interference, you inevitably end up in a situation where the freedom of some (or many) is curtailed because they don't have the means. Ideally, a government should be just overbearing enough to guarantee that everybody has a fair chance to achieve, and pursue that freedom. To provide a sort of safety net that ensures that you don't starve (or die because you can't afford health insurance), but not to the extend that it removes the incentive to find a job.
A concrete example is the liberal (classically liberal I presume) Dutch constitution of 1848. Before that, the Netherlands were an absolute monarchy, with the king appointing most members of parliament (usually nobility). The fact that the Dutch are so damn tall can be traced back directly to that constitution, which led to a more equal distribution of wealth.
The American Dream is just that: a dream. There are always the
stories of those who have achieved, thanks to the great amount of
freedom that you have, but the vast majority does not. They may be
working in a steel mill, waiting for the next round of layoffs. There's a lot to be learned from the USA, such as the flexible labour market (which is stagnated in most of Europe, and a major part of the lacklustre economic growth over the past decades). But there are things that we do better, too. -
RE: Government Shutdown
@boomzilla said:
I'm not sure of a significant political party in other parts of the world that is even as tepidly pro-freedom as the Republican party (which is only most, but not all of the American Right).
The freedom as a same-sex couple to get married? The freedom to have your life ended in a dignified manner by a physician if you're suffering intolerably and incurably?Freedom is not something absolute. It has different meanings in different parts of the world. You could even argue that government subsidies allow someone the freedom to pursue the life he wants to lead. Whether that is something desirable (until not too long ago, the Dutch government would support painters and sculptors, and before even buy their art that nobody wanted) is a different issue.
The fact of the matter is that unbridled capitalism, as witnessed during the Industrial Revolution, leads to near servitude and abject poverty for those who do not have the means, and will never have them either. There's little freedom in that, when your free choice is to either work 80+ hours a week for a pittance, or starve in the streets. In that sense, communism is much fairer, because at least everybody leads a miserable life (except the party bosses of course).
I would dare say that some of the liberal parties in Europe are more pro-freedom than the Republicans, if you consider the entire picture.
-
RE: Government Shutdown
@joe.edwards said:
@Severity One said:
Put it this way. Consider the political spectrum as a 2D graph, with left-wing (big government, large government influence in the economy) and right wing (small government, free market) on the X-axis, and progressive (for example, gay marriage) and conservative on the Y-axis."liberal" in the European sense of the word, not the American
I have trouble grasping what denizens of other countries mean when they use the same adjectives we do to mean different things.The conservative liberal party, which currently is the largest party in Dutch parliament, is the most economically right-wing of all parties (X-axis), and slightly conservative when it comes to social issues (Y-axis). Having said that, they were in favour of gay marriage, but have been accused of squandering their liberal roots (their name translates to "Popular party for freedom and democracy") with issues like harsher punishments for criminals, support for extended powers for the police and security services to spy on the population, etc.
Essentially, it's a secular (not influenced by any holy books) free market party.
-
RE: Government Shutdown
Quoting myself... always a bad sign...
@Severity One said:
On the other hand, such a deadlock as the USA experiences is practically impossible. Practically, because the Netherlands are facing the issue that the governing parties have a majority in the lower chamber of parliament (roughly comparable to the House), but not in the upper chamber (roughly comparable to the Senate). So now they're doing horse-trading with certain parts of the opposition.
And you might find this ironic: they don't have enough support for the budget cuts they're proposing. The current government is a coalition of conservative liberals ("liberal" in the European sense of the word, not the American; centre-right) and social democrats (centre-left).
-
RE: Government Shutdown
@El_Heffe said:
There are things about other countires that I find equally baffling and absurd. Like "Belgium didn't have a government for months". WTF? You elected people, therefore you have a government. If they leave office for some reason, you replace them. To "not have a government" makes no sense to me.
Belgium did have a government, but it was the government of the last elections. No doubt the current government will stay on for a long time after the next elections, but it's to be hoped that it will take less time than the 541 days (!!!) it took for this government to be formed.
Yes, almost a year and a half. It's an absolute world record. To understand why this absurd situation was allowed to take place, you have to understand Belgian politics, and it's generally acknowledged that understanding the universe is considerably easier.
@El_Heffe said:
Also the apparent ability in many countries to call for elections whenever they want rather than on specific dates.
That's mostly in Britain and former British colonies (Australia, Malta, etc). In other countries, they fulfil their terms, or there are premature elections if the government loses support in parlliament. -
RE: Government Shutdown
@boomzilla said:
Does your government have to follow the law? The law said, "here's a budget for the next year or so." And then when that year passes, there is no authority (for many things) to spend any more money.
This situation is almost impossible to happen in Europe, because they're parliamentary democracies as opposed to the presidential democracy that the USA has. The government (almost) always has a majority in parliament, because it's parliament that formally approves the new government after elections. There are differences (the British and some of the former colonies use the Westminster system, where a government minister must be a member of parliament, whereas in others they cannot be part of both the executive and the legislative), but with the notable exceptions of France and Russia, presidents (or monarchs) usually have very limited constitutional power, and can certainly not veto legislation.On the one hand, this may lead to more frequent elections than once every four or five years, if the government relies on an instable coalition. On the other hand, such a deadlock as the USA experiences is practically impossible. Practically, because the Netherlands are facing the issue that the governing parties have a majority in the lower chamber of parliament (roughly comparable to the House), but not in the upper chamber (roughly comparable to the Senate). So now they're doing horse-trading with certain parts of the opposition.
-
RE: Government Shutdown
@eViLegion said:
hy is your government so weird?
Because most countries in Europe don't have the extensive checks and balances that the USA have.You have to keep in mind that, when the US Constitution etc. was drawn up, Europe had experienced the Englightenment, which in terms of government meant that the king did nice things for his people, whilst still being an absolute monarch. Pretty much only the UK had moved on from that.
However, the USA was almost an experiment in nation building. They got rid of all the stuff they hated from Old Europe, such as Bills of Attainder, and started with a clean sheet. And they made sure that no single person could grab too munch power.
Like most revolutions, however, things were not perfect from the start. The system in the USA has some fundamental problems that will be difficult to solve without taking away some of the very principles of the state, which will be unpalatable to the vast majority of the Americans. The idea of checks and balances is that you come together to find compromise. However, if those involved refuse to come together, you have a problem. And the first-past-the-post system with electoral districts favours the more radical and less inclined to compromise.
The system in most of Europe is much more of an evolution. The French Revolution has been incredibly important in world history, but after those chaotic years and the Terror, things calmed down and evolved to the current state of affairs. France is an exception in the sense that it has a presidential system, unlike most of Europe which has a parliamentary system, but it differs enough from the US system so that such a situation as the current shutdown is highly unlikely, if not entirely impossible.
As for most of the rest of Europe, the government (the executive) can always rely on a majority in parliament (the legislative). If the government loses its majority, it'll have to resign, and new elections are held. The current government will stay on as a caretaker, until a new government has been formed. Italy may be facign just that today.
But when it comes to weird countries, you mentioned Belgium. That would most definitely top my list of dysfunctional government and an overly complex structure.
-
RE: Obamacare: TRWTF
@Mason Wheeler said:
We don't need 40 million less uninsured people in this country; we need about 250 million more. When something as fundamental as staying healthy is so expensive that the average person can't afford to take care of it out of his own pocket, that is the problem we should be solving. Insurance does nothing to decrease the underlying costs of health care; it just sweeps the problem under the rug.
That's one of the silliest comments I've ever read. Forget for a moment what kind of insurance it is, and how you feel about this insurance being compulsory.What you're saying is that having insurance is the wrong solution. So we should do away with car insurance; people should just drive more carefully. We should do away with home insurance; people should just take care that their houses don't burn down. We shouldn't test our software; developers should just not introduce bugs. (We actually had a former CTO say that.)
You may argue in favour or against compulsory health insurance, and there are plenty of arguments on either side, but arguing against health insurance in general is plain daft.
-
RE: UK government showing they are modern?
Makes perfect sense to me. We're talking about pensioners, and we all know how they hold on to things of the past ("the good old days") like Windows 98.
-
RE: Spaghetti UML
With so many actors, in Holloywood this would be considered an ensemble cast. Very much a staple of disaster movies like "The towering inferno".
So all in all, very appropriate.
-
RE: I hate my ex-colleagues
@PJH said:
@Severity One said:
But we're not a third party. We're a mobile operator. We distribute these SIM cards.@PJH said:
Well, yes. If you ever enter the Japanese market, for example, you're going to come up against a rather sticky problem - it's illegal (as a 3rd party) to read the IMSI - even the modems out there will refuse to give you the IMSI of the SIM it's using.The fact that IMSIs are being used rather than the ICCIDs is another WTF in itself.
Well, no.
Fine then, it's a mobile subscription. I didn't want to go into too much area-specific jargon.The Sim object represents a mobile phone,
Another WTF then. (1) The SIM can move phones - if you want to represent the phone, you should be using the IMEI of the phone rather than the IMSI of a SIM in it. (2) What do you do with dual/triple-sim phones? -
RE: I hate my ex-colleagues
@PJH said:
The fact that IMSIs are being used rather than the ICCIDs is another WTF in itself.
Well, no. The Sim object represents a mobile phone, rather than a piece of plastic with a chip on it. When assigning services, or provisioning things on the switch, we don't really care about the ICCID. (Which I had to look up; we call it the serial number.) The Sim object also keeps things like PIN and PUK codes, so in that sense it's an image of that piece of plastic.You could argue that it's a misnomer, but trust me, that's the least of the problem of that database and its API. Not having any constraints, not even primary keys, comes to mind as being a bigger problem.
-
RE: I hate my ex-colleagues
@Sutherlands said:
I'm pretty sure generics could always use primitives.
No. You can use autoboxing, but the generic class has to be declared with <Integer> and not <int>. -
RE: I hate my ex-colleagues
@eViLegion said:
You've got it the wrong way round.
Hey, I never denied that. :)
You are THEIR ex-colleague, and they left for greener pastures to get away from you. -
RE: I hate my ex-colleagues
@JBert said:
Now where's the OP when you need him?
Working, for a change.It's indeed as some of you have already figured out. Instead of using the unique identifier as a key in a Hashtable, the guy used the hashCode() of the object that contains, among other things, this unique identifier.
As a little bonus, two kinds of classes are stored in this structure, both indexed by hashCode().
But this whole thing is a world of hurt. These were "developers" (and I'm using the word loosely) that had found the silver bullet for error conditions, return codes and whatever else you might want to convery: java.lang.Exception.
Object not found? Throw Exception. Database crashed and burned? Throw Exception. Logic error in your code? Throw Exception. Universe is coming to an end? Throw Exception.
-
I hate my ex-colleagues
The disadvantage of working in the same place for over 12 years now, is that some of your colleagues depart for greener pastures, and leave behind memories – and old code.
In one particular application (which is a home-built orchestration layer), certain objects are temporarily stored, because they would be used soon after, and this saves a round-trip to the database. So far, so good.
However, the WTF is as follows:
- There are two classes, Customer and Sim (those little cards you put in your phone). Both are stored in the same object cache.
- Both classes have a unique identifier (a customer ID and the IMSI, respectively), but instead hashCode() is used to index them in a Hashtable (obviously not a Map).
The method hashCode() that every Java object has, returns a 32-bits integer. It's usually unique, but deinitely not necessarily so.
And then we're wondering why we get discrepancies...
-
RE: Just fire 2 blasts outside your window
@boomzilla said:
Generally, Republicans antagonize countries we don't like and treat our allies well.
I present to you: the Hague Invasion Act.Hint: the Netherlands are a founding member of NATO. They also host a lot of international judicial and police services.
This amendment was introduced by two Republicans, and signed into federal law by a Republican.
We all know the US penchant for invading considerably smaller countries, but a NATO ally?