Showing posts with label solution. Show all posts
Showing posts with label solution. Show all posts

Wednesday, May 6, 2015

I still wonder how come that after so many years of HTML existence there is no easy way to output date/time values in local time. What could be as simple as having an element like <localdatetime value="2015-05-06 10:39:00" format="hh:mm"/> to make sure that user sees the time in the local timezone? (the value as you may have already guessed comes as UTC date/time and the format allows to control which parts of date/time have to appear in the result)
The problem is that even in the simplest case of a static page that, for example, now and then has to display a maintenance warning like "due to maintenance works the site will be unavailable till 10:00 of local time" the developer must use javascript or something else to render the time correctly. That's quite annoying.

Tuesday, November 27, 2012

Win7 Russian - RunAs command not working with error 1332: No mapping between account names and security IDs was done.

Spent a half day to find the reason for the problem. I am running Windows 7 Professional Russian on my box. Yesterday I discovered that RunAs command was not working. Neither was the "Run as different user" shell menu command. In any case the error message was the same - "No mapping between account names and security IDs was done.". In the case of the RunAs command some extra info was displayed in the console. It was the ERROR_NONE_MAPPED 1332(0x534) error code.

I searched and read Google for many hours, tried different command line arguments, created a new user to test with, double-checked that seclogon (Secondary Logon or "Вторичный вход в систему" in Russian) service is up and running, looked through local security policies to find anything related, even ran a malware detection utility. No luck. I even went so far as creating a small C# snippet that tried to run a process with different credentials:
var pswd = new System.Security.SecureString();
foreach(char ch in "test123")
   pswd.AppendChar(ch);
var psi = new ProcessStartInfo { 
    UserName = @"my-pc/testuser", 
    Password = pswd, 
    FileName = @"c:\windows\system32\notepad.exe",
    WorkingDirectory = @"c:\",
    UseShellExecute = false
    };
Process.Start(psi);
It failed with exactly the same error.

Finally, desperate and disappointed of wasting so much time, I found the cause - the Control Panel/"Clock, Language, and Region"/"Region and Language"/"Administrative"/"Language for non-Unicode programs"/"Change system locale" was set to "English" and that totally broke the internal user account mappings for the underlying system call.
Here is the screenshot of where it is in Russian version of Win7:

Once I had changed the setting to "Russian" and restarted the box everything started to work as expected.

What can I say about that experience? Now I hate localized versions of Windows even more than before.

Monday, April 18, 2011

Follow-up: Why I consider these features missing in Java

Some time ago I created a list of features I consider missing in the current Java implementation. As I recently realized it makes sense to provide reasoning for some of them to be in the list.

Friday, December 24, 2010

JPA + Hibernate: optimizing queries on a many-to-many relationship

Following up a discussion (in Russian) on a developers' forum on advanced querying against many-to-many mapping in JPA I have compiled all my findings in this post. I intentionally leave all object and database names close to the original maybe with minor changes.

Thursday, January 28, 2010

My list of features missing in Java

It is a very common question on interviews about what features you consider missing and would like to add to Java. Here is my list:
  • C#-style properties accessible as such via reflection;
  • C#-style yield keyword;
  • C#-style as keyword;
  • Get rid of java.util.Date hell - will require changes in java.sql as well;
  • Function objects, specifically for bulk processing on collections; implies C#-style delegates;
  • modularity, e.g. OSGi-like bundling - no jar-hell;
  • Annotation-based configuration for JavaBeans, again, like it is done in .NET System.ComponentModel; extensive support in Swing;
  • Something similar to org.springframework.util.Assert class for common runtime checks;
  • Human-oriented Generics;
  • Byte-code emitter API;
  • Unified interfaces and compiler support for events like in .NET, free of known problems;
  • One more feature would be nice to have - a user-defined context reference in java.lang.Class object. This would let keep all class-related extensions, e.g. persisters, serializers, validators, type descriptors, etc, acessible by simple navigation as opposed to keeping multiple mappings.
  • Extremely useful feature - C#-style verbatim string literals (@"...") = multiline strings in Scala ("""...""");
UPD: I think I'd better provide some explanations why I deem these features to be missing.:-)

Thursday, January 21, 2010

IBM eXtreme Scale vs ORMs

Ah, that's a solution I have also been thinking over for quite long time. Distributed object caching - that's the next generation platform for most applications. I am sure this is one of the most interesting areas to work in. Shall I seek for opportunities with IBM, maybe? :)

Wednesday, December 23, 2009

Entity metadata: Java vs XML

The architecture of the last multi-tier project I worked for included a bunch of C# frontends connecting to a few Java services. There were a number of business domain entities. The state of almost every entity was continuously mutated.

Thursday, October 15, 2009

Enterprise Data Fabric is what we need?

I have just watched this presentation on Coherence by Cameron Purdy, a vice president in Oracle. Well, I think it is the very right direction they have been moving at so far. I encountered similar but custom solutions at least in three big projects at different companies. I must admit that no other architecture can fit equally well to the modern business requirements where delivering the most recent values across the enterprise is important (this is true for almost every modern application).

Frankly, I feel incredibly envious about the work they have been doing in Tangosol(now Oracle) :-). Quick search in Google and Wikipedia yields that there is a term for the technology and it is Enterprise Data Fabric (EDF) which sounds good to me.I feel like writing my own implementation of EDF based on experience I have got with that kind of systems.

Nowadays the biggest problem is that integration of systems has typically been done in a totally chaotic way. Even while some enterprise applications are using Coherence (or GemStone GemFire, or similar), others are not and will never be able to due to major architectural flaws making them incompatible with EDF. There are still so many applications designed on top of a relational database, for example. Honestly, almost every such system is cr*ppiest legacy nightmare, - totally inflexible, hard to maintain, so far away from low latency data delivery - and thus very inefficient.