Java, JDK, JRE locations on OSX

JRE for browsers (mine was 1.8.0_101, 160mb, was up to date):
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java

JDK, JRE installed with installer:
/Library/Java/JavaVirtualMachines/

I had only:
$ du -d1 -h
312M ./jdk1.8.0_25.jdk

Was not up to date.

After installing U101, I had:
$ du -d1 -h
338M ./jdk1.8.0_101.jdk
312M ./jdk1.8.0_25.jdk

I removed the old one.

[jug.bg] Speaking at Riga Dev Day

So I'll do a talk about Http/2.0 at Riga Dev Day Conference. I'll be there representing the jug.bg. I'm pretty psyched to check out Latvia.

My session is on the first day

speaking-at-rdd16-2

Update: my talk didn't go too well, because of projector issues. 15 min gone, flickering screen and me nervous ... overshot my time.

And to top it all of they recorded it and said it will go to youtube in a couple of months. 🙁

Not that it matters, but all my demos worked, kind of a Pyrrhic victory.

Update2: Riga is awesome and very beautiful.

IMG_6612 IMG_6616 IMG_6641

[jug.bg] Adopt OpenJDK is not for mere mortals

forbidden.duke

A bit of introduction - we as a jug (java user group) got more active at the end of 2013 in no small part thanks to Ivan. We managed to build openjdk, import it in 3 major IDEs (eclipse, intellij and netbeans) and contributed a Virtual Machine with buildable openjdk 9 (both in fedora and ubuntu) and organized a couple of events, we decided we were ready for the next part.

At the end of 2014 we started timidly to try to contribute in the Adopt OpenJDK program. Adopt OpenJDK allows everyone* to participate in building and writing the java platform itself (or at least that's how we understood it *back then*).

We knew that LJC (London Java Community - their most popular jug) heavily participated in the new Date/Time API and soujava (Brasil's most popular jug) also managed to include code in the OpenJDK. Elated by these guys' successes we decided we had enough free time and sheer energy to contribute to the OpenJDK and thus put ourselves on the OpenJDK map.

In December 2014 we asked for something to work on. Nobody answered.

We decided to work on a simple Throwable convenience method (JDK-5050783). We had a hackaton. We submitted our fix. We were given some feedback and we submitted another. And we were told not to play with grown up stuff. That was a bit discouraging. But we didn't give up.

In February 2015 we started working on jaxp warnings. We fixed 43 easy warnings and submitted a patch. Then we fixed more harder warnings and submitted another patch. The great Joe Darcy answered but unfortunately we got nowhere again. That sucks.

A bit before that (Dec 2014) jug.bg member Doychin Bonzhev found a bug in the NetworkInterface and submitted a solution. He even submitted to another mail-list. He got a response (saying it is reasonable solution) and answered, but that was it. Nothing AFAIK followed.

So that was it for us. We gave up. Probably we didn't know the right people, but I argue that shouldn't matter. From time to time we get mentioned as collaborators in the Adopt OpenJDK by our dear friend Mani. We don't feel like that at all.

* Now you understand why the asterisk, right?

Powering an external hdd on a raspberry pi or odroid

IMG_5449

I've had issues powering an external hdd on a raspberry pi or odroid. I had to buy Y-cable (Y-cable = branched USB cord for dual power).

I found out, that powering the raspberry pi or odroid on the normal USB supplies more power than on the mini/micro-USB they use. The micro/mini USB used for power has a fuse that cannot supply more than 1A, but powering via one of the USB typeA works fine. Of course you would need a Y-cable, because even the most powerful USB chargers cannot produce enough power on one port.

That's another point - most USB chargers say they produce 2A or 2.1A and the crappy ones produce .3A, the good ones go up to .9A. So everybody lies. But .9A is good enough with a Y-cable.

The PI/Odroid use like .5A, the drive uses .3A, but they spike to more than 1Amp.

jdk1.8.0_25 internal compiler error

Screen Shot 2015-07-14 at 11.35.31

A bug report here: https://bugs.openjdk.java.net/browse/JDK-8065424

Information:Using javac 1.8.0_25 to compile java sources
Information:java: An exception has occurred in the compiler (1.8.0_25). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
'xj-conc-j8'
Information:7/14/15, 11:22 - Compilation completed with 1 error and 0 warnings in 2s 319ms
Error:java: Compilation failed: internal java compiler error

Linkedin's wall of fame/shame

Linkedin gives me a list of all the people that have done something very stupid.
They have given their email passwords to the "most weird social network":

Screen Shot 2013-10-23 at 8.19.28 PM

Note: in my early days I may have done the same - I don't remember, but if I did - I was also stupid to do so. I have checked several times if linked has some access to my email - via an app or via some other means - it doesn't.

Compromise? Hell NO

Та значи в човешките отношения винаги има търкания. И когато се стигне до такива, ти се казва: ами причината е еди коя си привичка в характера на човека отсреща. Ти си по-зрял, видял си го по-ясно, направи компромис, устискай докато другия узрее. Ето оттук се коренят 3/4 от проблемите в общуването. Добре де - в моето общуване.
Според мен от това "устискай", "направи компромис" следват голяма част от недоразуменията.
Защо? Защото първо, това привлича хора, които не са достатъчно "узрели" и усещат/знаят, че ще получат известна доза търпение. Второ, създава дисбаланс в отношенията, които "неузрелите нежелаят" да компенсират на по-късен етап. Този дисбаланс некомпенсиран оставя доста горчив вкус в устата. Те са свикнали отсрещната страна да е търпелива.
Оказва се, че търпението в тоя случай е най-лошият подход. А търпението е като универсално качество, винаги положително качество. Ами да, ама не. В този случай само се отлага неизбежното.
Освен това, защо просто не общуваме с хора, към които е нужно да се правят по-малко компромиси?!

HP Director, HP Scan for OS X do not support cyrillic

Scanning a document in HP Scan (part of HP Director - the drivers for my printer in OS X) is tricky - the document cannot be saved in a folder with a long name, name in cyrillic; filename must be <24 chars long, cannot contain cyrillic. I spent 10 minutes trying to guess where the problem is. I am disappointed. This is for future reference. I know I will forget about this eventually, but I hope I will be smart enough to check here for the solution

Google is attacking Gmail?!

I have one gmail account configured to access another gmail account.

Now, here comes the fun part - how to fix it.

I logged with the other account (the one google claims is hacked) and I got a message similar to this one:

Then:

And then I have to click Yes:

And then I have to log in quickly.

Weird. Google migrated to this security protocol without notifying me. I have this new application style log in on my primary account, but not on the "cracked" one.

Facebook apps - no way out?!

At some point I saw many items in my facebook timeline coming from some weird apps. So I go to settings and see this:

I checked the list. I recognized only 5-10 apps. I don't how the others got access to my account. So I check online how to switch the whole thing off. I found the button in the privacy settings. It looks like this:

I click it, and then I get this:

I have been getting this for a couple of weeks now. Facebook dudes, I know that by using your service I give you full control over everything I do and get no control over what you do with my info, but at least make me feel like I have some control.

This is far too unprofessional.

Смъртта

Една приятелка почина преди няколко години. Преди няколко дни беше годишнина. Не знам дали иделизирам девойката или наистина беше страхотен ч0век - не мога да преценя сега. Но не беше лош човек определено. Тъжно е. Наскоро разбрах, че родителите й също са починали. А от двете ми срещи с тях ми се сториха много положителни хора. И доколкото успях да разбера, смъртта на единственото им дете сигурно е била тежка за приемане.

С Лора не винаги сме били на една вълна. Но никога не й се разсърдих сякаш и останахме приятели до края. Срещал съм адски гадни копелета през живота си и се чудя защо по дяволите точно нея прибра? Сякаш е честно някое гадно копеле да беше заело нейното място. Знам, че животът не е честен, но пък понякога човек не може да проумее тоталната безпричинност на всичко, което се случва...

Замислих се за родителите й. Възможно е смъртта на Лора да е била твърде тежка за приемане новина и това да е било нещото, което сякаш е изгасило светлината в края на тунела. Възможно ли е човек да загуби нещо, което да го накара да изгуби волята да се бори и да продължава напред? Аз напоследък минавам през разни неща и знам, че всичко ще се оправи, но има моменти...

Default contact group on iPhone

My iPhone downloads my contacts from gmail. Whenever I click on 'Add new contact' I want this new contact to be uploaded to gmail. Unfortunately that is not the default behaviour. The new contact goes to iCloud, even though my default mail and contacts account is gmail.

Here's how to fix this:

20120625-150844.jpg

Remove the iCloud contacts sync. This will completely remove the iCloud contacts group:

20120625-151005.jpg

Problem solved

LinkedIn has dicovered salting

You've heard of the recent LinkedIn leak of hashed passwords, right?

Well, this is what they say on their blog:

Finally, we’ve enhanced our security measures through an additional layer of technical protection know as “salting” to better secure your information.

LinkedIn, your passwords weren't salted, really?

And recently they sent me an email saying my hashed password is on a hacker forum.

Здравна книжка, дубликат

Липсва ми здравната книжка. Отидох при личния лекар. Заместващия му каза да отида до РЗОК в Младост. Отидох. Случайно хванах шефа там и той каза: не тук момче, ул. Енос 12. Отивам там, на информацията ме питат за номера на книжката. WTF?! "Тогава отидете в каб. 302". Отивам там, " кажете знаете ли кога е издадена?", "не, не знам". "ходили ли сте на зъболекари. Ако да, кога", "ами 2005та мисля последно ходих на такъв, който работи с касата", "Няма такъв, слезте в деловодството". Слизам, там - "Без номер не може, питайте личния за номера". Звъня на личния: "не съм ви първи личен, трябва първия да намерите". Пак в деловодството: "първия ми личен е починал, какво правим?", "ами той всъщност не ви е първи, ама ви е първи, отидете при него". И това след пълен кръг от институции.

Извод: мразя държавни служители. Моля ви уволнете ги всичките. Ненужни са. Така и така си плащам здравеопазването.

Update: problem solved с кутия бонбони и кафе за личната. Уж нямаше книжки и не трябвало да ги вади, но кафето някак й припомни, че някъде имала забутани книжки. Цена: 4.68 лв.

Виваком ми казаха да си го *$#^@#*&##

Началото на сагата ми с Виваком е описано тук.

Оказа се, че сметката ми не е 104, а е 124 лева. Това ми е личен рекорд за този оператор. Мтел държат за цялостен принос със сумата 270 лева за 1 месец.

Беше ми спрял интернета и се обадих да питам кво става. Оказа, че имам отговор на възражението. Прочетоха ми го по телефона. Отговорът беше (по памет): благодарим, че сте ни клиент. Понякога стават недоразумения. Смятаме да подобрим качеството. Цените са следните за интернет в БГ и извън.

Нямаше отговор на въпроса дали мога да чуя разговора, в който ме излъгаха. Не мога да получа оригинала на възражението си, нито копие.

Най-накрая успях да се логна във vivacom.bg (при цъкане се отваря един попъп, ебаси ламерското). Излезе и фактурата. Ето го интернета:

Така и не разбирам какво е това времетраене. Може би килобайти? А това е списък от всички сесии? И защо пише GPRS? На телефона пишеше 3G и EDGE.

Нищо не разбирам. Някой ако може да ми го обясни. Обясниха ми - това било килобайти.

Значи се оказва, че имам няколко сесии и всъщност 11те мегабайта реално съм и изразходил в една сесия. Как точно се случи това? 2 уебсайта и гугъл мапс са 11мб? Защо телефонът ми не ги показва?

И защо по дяволите се таксува на 100кб/сек? Телефонът ми постоянно прави нови сесии, сменя между 3G, GPRS и EDGE, тоест това само по себе си е безумие.

И още нещо. Ето ми я фактурата:

Вие някъде виждате ли 124 лева? Сега една операторка ми рови из профила, за да ми покаже, че някъде това 124 трябва да фигурира. А да видим. Update: мацката си призна, че 104.01 -0.17 не може да е 87.17 и че никъде не пише 124. Идиоти. Та значи фактурата ми е (104.01-0.17)*1.2 = 124.608.

Оттук нататък следва следното: или да си платя оставащите 9 такси по 10 лева и да премина на глобул (единственият оставащ оператор) или постоянно да им звъня и да питам колко пари съм изхарчил. Обмислям. Съвети?

Longstanding Eclipse issues - fix them finally, please

Eclipse is the best IDE ever. It's the most stable, most popular, most- a lot of things. The developers that write the Eclipse code have T-shirts that say that - they are that proud. The code-base is said to be awesome - I don't have time to check. But, there are some longstanding issues.

First, SVN client. There's a CVS client that comes with Eclipse. SVN is way more popular. Put the client inside finally. I'm sick of solving numerous JavaHL issues. Fix it. I don't care how, just do it.

Second, Tomcat is the best web container ever and most popular in development. Integrate it better. There are numerous issues with debugging, redeployment and so on. These problems are so old. Fix 'em NOW.

Third, installing plugins is soooo slow. So very slow.

Fourth, web development is not that well integrated. WTP is still buggy, there are issues with configurations, deployment and so on.

Update: Fifth, autocomplete should put jdk classes/interfaces first!!! This is so important. Screenshot:

WTF is antlr.collections?! Are you kidding me?

Now, I'm trying to launch a main method without the "String... args" parameters and Eclipse cannot find it. This is also a longstanding problem.

This works:

public static void main(String... args)

This does not (eclipse cannot find the method):

public static void main()

I'm pretty sure there's a solution, but I'm not going to waste time searching for it.

I've wasted time with compilation, memory, various configurations with xml and whitespace also.

There are always solutions, but this is wasted time. What are the developers working on? Stupid pointless features? Fix these please. Please.

Vivacom - разочарованието

Преди 2-3 месеца най-накрая успях да си сменя оператора от Мтел на Виваком.Важно е да отбележа, че сметките ми в Мтел държаха трицифрената граница (100 лв)  и колкото и да ограничавах говоренето си, не успявах да сваля значително под 100 лева (най-ниската май беше около 90). Съпортът им постави рекорд по on-hold: 40 мин. Сметките идваха веднъж на 5 месеца и едно от плащанията ми беше над 500 лева (за 5 фактури). Интернетът последните месеци беше адски зле. Та летвата, която Мтел поставиха беше адски ниска.

Първата ми сметка във Виваком беше 50 лева като 20 от тях за интернет. При повечето хора, с които говоря, не са абонати на Виваком. Впечатляващо. Втората сметка също беше там някъде. Имаше и дребни недоразумения - не позволявали tethering (споделяне на интернет от телефон към лаптоп най-общо) - направих си го сам, заобикаляйки ограниченията им. Другото - регистрацията за електронни фактури на сайта е адски тегава и ако объркаш, чакаш следващия месец за нова фактура.

Съпортът им се оказа адски бърз - вдигат почти мигновено. Разбира се и те подхождат по типично държавнически - ние тука тва от системата идва, тя така е направена, ние не можем да помогнем. Идиоти, или просто са ниско платени и не си дават много зор.

Разочарованието дойде този месец. Обадих им се от Чехия и ги питах колко струва един мегабайт, те - 5 лв, аз - на 1кб ли таксувате, те - да. Ползвах аз около 1 мб или поне така пишеше на сметката телефона ми. Връщам се тук, телефонът ми спрян. Звъня, те - ами висока ви е сметката. Аз - защо? Те - ами много интернет сте ползвали - 11мб. Питам аз как така е 11 мб, те - ами ние таксуваме на 100кб.

Звъня и питам как да оспорвам, те ми казват официално да подам възражение (поне молба не ме караха да пиша). В същото време внасям 20 лева, за да ми се качи кредитния лимит.

Днес отново телефонът ми е спрян. А днес точно ми излиза фактурата. Звъня и питам защо, бе тъпаци такива, пак ми е спрян телефона? Те - ами много висока фактура - 104 лева. Аз - ама сега имам 0.00 лв потребени, фактурата тъкмо е излязла, може би трябва да ми дадете някакъв толеранс да я платя. Те - да, прави сте, ама много е висока и затова ви е спрян телефона.

И тук става най-интересно. Аз ги питам - защо не ми е излязла тая фактура в Ипей. Те - в системата ни за плащане е излязла, но в системата ни за отчетност не е излязла. И аз - демек не мога да платя през Ипей? Те - ами през кеш терминалите можете да внесете аванс. Кви бяха тия кеш терминали така и не разбрах. Той не успя да ми обясни също.

Тоест - оспорвам фактура, но докато не я платя няма да имам телефон. Не мога да платя през Ипей и не мога да си видя електронната фактура, тоест да видя за какво плащам. Но ако не платя - нямам телефон.

Напълно осъзнавам факта, че тази битка е безмислена. На оня по телефона му казах, че споря с радиото. Само от тези дребни наглед случки тия хора ще ме изгубят като клиент и то за едни 104 лв. Не смятам да се примиря с безумията им и просто ще отида при единственият останал оператор ако нещата не се решат по приемлив за мен начин. А Виваком имат потенциал. И то много. Но вместо да качат летвата, те се примиряват с летвата на Мтел.

Винаги съм се чудил защо мобилните услуги не се развиха като интернет предлагането от LAN доставчиците - конкуренция, ниски цени, адски високо качество. Явно защото държавата е намесена и спира конкуренцията.

 

ui:param ... and caching

I have the following thing:

<ui:param name="randomVideo" value="#{bean.randomVideo}" />
<a href="#{randomVideo.link}">#{randomVideo.text}</a>

Because <ui:param> does not cache the variable, Bean.getRandomVideo() is called twice, and the worst part is that the .text and .link are from different videos. I have already tried <c:set and <f:param. They both do not set the variable, maybe because I'm with facelets (JSF2).

Any ideas?

I hate getters and setters

I hate getters and setters in java. Half of my code is filled with them. They are pointless boilerplate code that says nearly nothing. 99.9% (I made that number up, but it sounds reasonable) percent of the cases they don't have any additional code in them.

And it is really hard to see whether a variable is read-only/read-write/write-only. You have to find the getters/setters to see that.

I have a notation where I put all the modifiers at the end of the class and separate them with a page of whitespace.

I don't like the C# solution - it's not really shorter, only binds the getter and setter together.

I have a proposition: use annotations:

    @Getter @Setter
    private boolean subscribedForEmailNotification;

And one wants to write extra code, one should be able to use the old notation. The compiler will check for collisions.

I don't see any reason why this cannot become the next syntactic sugar in java where one saves a bunch of useless code-writing.

Why is java development so windows oriented?!

I'm using a macbook. Obviously I'm using Mac OS. Not so obviously actually - recently I saw a few people using Windows 7 on a macbook.

JDK. Developing java applications on a Mac OS is not so straightforward as it is on windows. When you start on Windows, the first thing you do is download the JDK - that's easy. On Mac OS you don't have a real JDK, you have Java for Mac OS X. It's not the same. It's always late. Using SoyLatte they made a darwin port called openjdk6 that is a lot more like a real JDK. With JavaSE 7 it's even worse - there are binaries for Windows, on Mac OS one has to build it manually which is not that easy.

Eclipse. Then there's Eclipse. Thank god - there's an Eclipse.dmg that is pretty easy to install. But (there's always a but), the shortcuts are a bit changed. Alt+Shift+X becomes ⌘+⌥+X. There's also the speed issue - Eclipse is not as fast on Mac OS as it seems on a Windows machine.

Browsers. One major setback is that if one does front-end, one needs Internet Explorer to test. Otherwise QAs come and kick one's ass because something doesn't work on IE6 for example. I hate Internet Explorer. Not only IE6, all of them.

Configuration. In my project I have:

File file = new File(element.replace("file:", ""));

my Windows-using colleagues have

File file = new File(element.replace("file:/", ""));

The good thing is that since Mac OS is unix-based I have the settings that are closer to the Ubuntu we deploy our production on.

I don't know - maybe I should buy a new Macbook with a fast SSD with a lot more juice into it than the one I have now (a two-year-old one that hasn't been reinstalled since). Now there's the question - should I buy the 13" or the 15"?

P.S. The things are getting a lot better. OpenJDK6 port is pretty mature (I use it), OpenJDK7 port is coming soon. Apple donated it's JavaSE port to Oracle, so soon Java's download page would feature a .dmg file, which will be awesome.

Still I think developing java apps on a macbook is a bit harder than on a Windows machine. I wouldn't go back to Windows because of the awesome hardware and because the OS is so much better for anything else.

bg headhunters - yeah, right

Това е комуникация с един от т.нар. bg headhunter-и:

On 02/23/11 5:40 AM, Daniela Solachka wrote:
--------------------
Здрасти, понеже виждам, че се оплакваш от headhunters, мога да те посъветвам да си махнеш от профила  "interested in career opportunities". Или пък целия профил. 🙂
Поздрави.

Моят отговор:

Всъщност се интересувам от истински career opportunities, а не от тези стандартните типично по бг изпълнени:

  1. елате на интервю,
  2. дайте си всичките лични данни,
  3. ние няма да ви кажем нищо за фирмата, за която ви търсим и
  4. ще ви сложим сивито в нашето портфолио.
  5. На интервюто ще ми се задават абсолютно малоумни въпроси, защото ще си говоря с някоя тотално не-техническа руса кака.
  6. Няма да сте прочели въобще сивито ми или поне няма да сте вникнали в него и ще ме предлагате за тотално неадекватна позиция, защото ще сте извадили само 2 ключови думи и от моето сиви и от изискванията на клиентите си.

Не, не желая career opportunities на бг headhunter-ите. Там се връзват само разни junior-и, които сами трудно ще си намерят работа сами, защото нямат опит. Но качествените хора с опит избягват подобни услуги (повярвайте ми, всичките ми контакти имат същото мнение за целия този бизнес, просто са учтиви и не го казват в лицето на спамърите).

И, btw, трябва да се кръстите bg spammers вместо bg headhunters. Спамите през linkedin, skype, mail и каквото намерите още. Няма отърване.

Ebanking на ОББ - #epicfail

Всичко започва с регистрация на сайта ebb.ubb.bg (конкурс ли е имало за името на субдомейна?). Оттам си избирате парола, НО НЕ И ПОТРЕБИТЕЛСКО ИМЕ. (това е стъпка 1)

След това отивате на място в клон (клонът си го избирате при регистрацията в стъпка 1 и не можете да идете в друг клон) и потвърждавате регистрацията. Дотук всичко е логично. Те ви дават плик с юзър/парола (стил нова дебитна карта).

Прибирате се вкъщи и се опитвате да се логнете с това потребителско име и парола. Не става.

Тук е важно да отбележим, че генерацията на сертификат (да и сертификат изискват) става само на Internet Explorer (мързеливци). Освен това сървъният сертификат на ebb.ubb.bg е self-signed (наистина ли сте толкова свидливи и непрофесионални?).

Така, докъде бяхме стигнали? А да, потребителското име и парола от плика не стават за логин. Сайтът им казва грешно потребителско име и парола.

И сега какво? Ами звъним на съпорта. Естествено не беше работно време и оттам (имали служител само за спешни случаи) любезно ми обясниха, че няма да ми помогнат, защото не било работно време. Тъпанари.

Продължаваме сами с опитите. Някой се сеща (в тоя момент вече сме трима и brainstorm-ваме какво може да е решението, не искаме да се предадем), че всъщност при регистрацията (направена април'2010) сме въвели парола. Добре, че е записана на лист. Изравяме я и пробваме с какви ли не потребителски имена: егн, мейл, ... Не става. Накрая пробваме с потребителското име от плика и паролата от регистрацията и viola СТАВА.

Дотук добре. Влизаме вътре (естествено с Internet Explorer) и започваме да ровим. Сега е момента да издирим как се генерира сертификат. Оказва се, че втората парола от плика е за генерирането на сертификат, без нея не генерира сертификат. Генерираме сертификат. УРААААА.

И най-накрая (вече са минали няколко часа и са изхабени много нерви) се логваме и половината линкове не работят. Кво става? Примерно не можем превод да направим. ЗАЩО? Разлогваме се няколко пъти и накрая откриваме, че при логин трябва да се цъкне един чекбокс (май беше нещо от рода на "Активирай нещо си"). Цъкаме там и вместо да ни логне, ни завежда до един екран, в който очаква код от sms. НЕЕЕЕЕЕЕЕЕЕЕЕЕ. А батерията на телефона беше паднала и не можехме да прочетем. Отказахме се да продължим. Обяснихме на изстрадалия клиент на ОББ, че като си зареди батерията и (ВЕРОЯТНО) ще може и преводи да прави, ама не сме сигурни, защото не сме стигнали до там.

Защо са толкова некадърни тия банки? ЗАЩО? КАКВИ МАЛОУМНИЦИ СА ГО МИСЛИЛИ ТОЯ workflow? ЗАЩО ИСКАТ СЕРТИФИКАТ И SMS ЕДНОВРЕМЕННО? А ПРЪСТОВ ОТПЕЧАТЪК НЕ ИСКАТ ЛИ? Ако искате сигурност, изисквайте УЕП, както вече правят масово банките, защото това е легалния начин да се правят нещата онлайн.

ОББ, СТЕГНЕТЕ СЕ. Моята банка иска регистрация, потвърждение на място и това е. А вие? Отворете електронните банкирания на другите банки и откраднете нещо работещо.

Некадърници!!!

Проблем с Infonotary Configurator 1.3.4

Репортнах следния проблем на инфонотари:

Плугинът Infonotary Configurator 1.3.4 ви за Firefox създава проблеми с Firefox за Mac OS X. Проблмът се изразява в тотално irresponsive (не мога да преведа) интерфейс браузър. Страниците не се зареждат адекватно, на линкове трябва да се цъка по няколко пъти и въпреки всичко не се зареждат. Пробвах изключване на всички плугини на firefox - открих, че проблемът е във вашия плугин.

firefox with infonotary plugin
firefox with infonotary plugin
firefox without infonotary plugin
firefox without infonotary plugin
firefox error probably related to infonotary plugin
firefox error probably related to infonotary plugin

Update: Ето комуникацията ми с Васил Бъдев (представи се като разработчик на въпросното нещо):

Здравейте,

Плугинът Infonotary Configurator 1.3.4 ви за Firefox създава проблеми с Firefox за Mac OS X. Проблмът се изразява в тотално irresponsive (не мога да преведа) интерфейс браузър. Страниците не се зареждат адекватно, на линкове трябва да се цъка по няколко пъти и въпреки всичко не се зареждат. Пробвах изключване на всички плугини на firefox - открих, че проблемът е във вашия плугин.
Версия на firefox: 3.6.10
Версия на Mac OS : 10.6.6.
Атачмънти:
Скрйншот с включен плугин (без пуснати други плугини):
Скийншот без
Грешка, която може би е свързана с плугина
firefox with infonotary plugin firefox without infonotary pluginfirefox error probably related to infonotary plugin
firefox error probably related to infonotary plugin
Date: Fri, 18 Feb 2011 12:44:39 +0200
From: Vasil Badev <v_badev_AT_infonotary.com>

Здравейте,
това вече го прочетох на вашият блог. Както писах и там, проблема според мен не е в Infonotary Configurator for Mozilla. До колкото си спомням по телефона ви обясних, че единственото което прави той след първоначалната инсталация, е да проверява стойността на extensions.infonotary-mozilla-setup.lastVersion, при всяко отваряне на нов прозорец, и ако тя съвпада с текущата му версия спира работа. Не можете да ме убедите че по този начин се чупи зареждането на всякакви станици, както и SSL връзките. Понеже при забраняване или деинсталиране на разширението не се премахват настройките които то прави, теорията че точно това чупи Firefox ми се струва още по-невероятна. Не случайно бях предложил да дойдете до офиса за да се опитам да намеря проблема, но Вие не дойдохте.

Най-вероятно проблема е във лошо работеща версия на софтуер за смарт карти или лошо настроен pcscd демон, но това не се вижда от снимките които сте дали. В самият конфигуратор има изключително малко специфичен за Mac OS X код и той се изпълнява само при първоначална инсталация. Ако имаше проблем като описаният от вас той щеше да се прояви при всичките ни клиенти, както и на нашите компютри. След като проблема е само при вас явно е някъде другаде.

П.П.
Mac-a на който реално се тества всичкият ни софтуер е с Firefox 3.6.12 и Mac OS X 10.6.6, но разширението е тествано и на Firefox 3.6.10.

Date: Fri, 18 Feb 2011 12:51:20 +0200
From: Vasil Badev <v_badev_AT_infonotary.com>

Здравейте отново,
чак сега прочетох какво сте коментирали в блога си, явно вече сте двама клиенти са точно същият проблем, но според мен той не е следствие от инсталацията на нашият add-on. Ако можете се обадете на телефона от подписа ми за да се опитам да локализирам проблема.

Date: Fri, 18 Feb 2011 13:14:29 +0200
From: mihail stoynov
Още веднъж: имайте предвид, че не желая да ви убеждавам в каквото и да било. Грешката наистина може да е във всичко и вероятно сте прав, тъй като познавате съответния плугин, но е непрофесионално да отричате грешка без анализ.
Вчера свалих файърфокс 3.6.13 и сега изтествах с включен плугин. Проблемът не се наблюдава, което може би показва, че сте прав. pcscd демона го включвам само като работя със сертификата, иначе ми държи по 10-20 процента от cpu-то постоянно и се принудих да включвам/изключвам ръчно, което е досадно. Надявам се няма да кажете сега, че това също се наблюдава само при мен 🙂 Ако проблемът се появи, ще ви пиша допълнително.
Отново с най-добри намерения,
Михаил Стойнов
Date: Fri, 18 Feb 2011 15:36:40 +0200
From: Mihail Stoynov

Здравей,
Отново се случи - виж атачмънта. Вече не съм сигурен в това каква е причината.

Date: Fri, 18 Feb 2011 16:08:57 +0200
From: Vasil Badev <v_badev_AT_infonotary.com>

Здравейте,
Apple ползват много стара версия на pcscd, която проверява какви четци са включени пет пъти в секунда (подробности тук -http://ludovicrousseau.blogspot.com/2010/08/ram-and-cpu-improvements-in-pcsc-lite.html). На това се дължи и натоварването.

Проблема само при включено устройство ли се наблюдава?
Може ли да ми изпратите изхода от следните команди в терминал с включен четец:
ps ax | grep pcscd | grep -v "grep pcscd"
ls -l /usr/libexec/SmartCardServices/drivers
ls -l /etc/readers.conf
ls -l /Library/LaunchDaemons/org.opensc.pcscd.autostart
/Library/OpenSC/bin/opensc-tool -i
/Library/OpenSC/bin/opensc-tool -l
/Library/OpenSC/bin/opensc-tool -n
/Library/OpenSC/bin/pkcs15-tool -D
pcsctest

Терминала се намира в Application/Utilites. Всяка команда трябва да я копирате и да я поставите в терминал и след това да натиснете Enter.

Date: Sat, 19 Feb 2011 22:16:55 +0200
From: mihail stoynov

Проблемът го има и с изключен четец.

Забележка: спирам пускам pcscd със launchctl:

launchctl (un)load -w /Library/LaunchDaemons/org.opensc.pcscd.autostart

Резултати от командите в атачмънта
Date: Mon, 21 Feb 2011 12:55:49 +0200
From: Vasil Badev <v_badevA_AT_infonotary.com>

Здравейте,
Ако при изключен add-on проблема не се проявява не знам какво да предложа освен да дойдете до нашият офис с компютъра и тук да се опитам да намеря къде е проблема.

Ако се прояви и при изключен add-on може ли да пробвате да обновите софтуера за картата и четеца.
За смарт картата първо ще трябва да деинсталирате SCA със sudo /Library/OpenSC/bin/opensc-uninstall след това инсталирайте последната версия от http://www.opensc-project.org/files/opensc/OpenSC-0.12.0-10.6.dmg. За четеца си инсталирайте актуалният драйвер на HID Global от http://www.hidglobal.com/drivers/omnikey/ifdokccid_mac_10.6_i386-3.0.2.dmg.

В новата версия на opensc няма файл /Library/LaunchDaemons/org.opensc.pcscd.autostart, така че няма да можете да спирате и пускате ръчно по същият начин.

Date: Mon, 21 Feb 2011 15:08:13 +0200
From: mihail stoynov

Здравейте,
Ще изчакам да видя дали проблемът ще се окаже хроничен.
Ако не мога да спирам и пускам ръчно pcscd, не бих ъпдейтнал, защото понякога тъпия демон скача до 50% cpu и си стои така. Имам нужда да мога да спирам/пускам ръчно.

Още нещо: другите ползватели на тоя демон как свикват с натоварването? Ако това нещо стои постоянно, лаптопът ми постоянно ще върти вентилатора на 6000 оборота и ще е доста горещ

Date: Mon, 21 Feb 2011 17:44:41 +0200
From: Vasil Badev <v_badev_AT_infonotary.com>

По принцип демона се стартира в момента в който включите четеца. Повечето ни клиенти не са се оплаквали от подобен проблем, така че или не са забелязали или не се проявява при всички. На нашата тестова машина pcscd не натоварва процесора повече от 1-2%, но до преди малко на него нямаше инсталиран четец на OmniKey. Сложих му техният драйвер и един четец с карта и ще го наблюдавам тези дни.

П.П.
Ако не искате да обновите OpenSC (стартовият скрипт е от него), може да сложете новата версия на драйвера на OmniKey. В момента сте с 2.6.4, а актуалната версия е 3.0.2.

How do you run windows when your primary OS is not Windows (need help)

My laptop is a Macbook. It runs Mac OS X. While the OS is awesome, it's not the most popular one. This would mean that there's software that is only made for Windows. And it's software that is custom, specific and generally cannot be changed for another software [running on OS X].

There is however one piece of software which even though it runs on OS X, I want on Windows. And that is Microsoft Office. MS Office for Mac OS X sucks. The ribbon interface is so ugly on Mac, the menus so different. And it deleted one of my presentations (while presenting it !!!). Don't even get me started on OpenOffice, iWork and all the copycats. When everyone around you is using MS Office, you have to use it too. Period.

So we agreed that I need Windows

The most common thing to do is get a virtual machine. I was using VMWare Fusion with one Windows XP and one Windows 7 installation for quite a while. The problem is the HDD. It just can't keep up with both machines (the host and the virtual). While stopping the swapping in the virtual machine can help, it doesn't fix the problem. And I have the fastest plate hdd available - 7200 rpm, a lot of cache. Also getting a lot of RAM also helps considerably - I have 4GB but the issue with the HDD remains.

I went to the competition

People said that VirtualBox and Parallels would do the job better. I tried VirtualBox for a day. Importing failed due to hardware inconsistencies and even while loading it just made the host os unresponsive. So I guess the competition doesn't do the thing better. What next?

What about remoting?

Using a dedicated machine that stays somewhere and logging on it only when needing windows could do the job. This means I have to buy an extra machine. Remoting would mean that I would need net constantly. And Remote Desktop for Mac is pretty bad. I could always switch to TeamViewer (also available for my phone), but it is not the best either. Also copying stuff while using my phone's 3G is not viable if the stuff is in the hundreds of megabytes scale.

What about SSD?

While the classic HDDs are good for working on serial pieces of data, SSDs shouldn't have the problem working in parallel with 2 streams of data. I have a friend who bought 50GB OCZ drive and he says his machine now went supersonic (a lot faster). The drive was like 130 euros. I can't work with 50GB. 128GB could maybe do the job but it's going to be tough. And buying a bigger one would be very expensive. Also I haven't asked how does this drive behave with a VM. It's important to do so.

And no I would NOT install Windows

...or get a Windows laptop. No way. No BootCamp either.

Conclusion: I need help

This problem would be relevant for everyone using any OS that is not Windows. So, people-not-using-windows, PLEASE HELP ME decide what to do.

The past 2010

The past year for me was marked by serious health issues that were pretty scary for me and the absolute lack of energy. There was some planet or constellation alignment, I don't know, but throughout all the year I lacked power. Maybe I need RedBull or some other drug. Coffee I think lost its power to revitalize me in the morning.

Due to the scary stuff I had to endure, I think I value life more and maybe I know a little better what I want out of the near future. I'm taking steps to live healthier and I understand that the human body is incredibly strong but also easy to be broken if not taken care of. I eat better. If I figure out this energy problem I think 2011 would be a lot better year. So this is what I wish to myself. Also to be more focused.

Малко за ориналните неща

Покрай празниците имах достъп до телевизор и гледах
новините по една от популярните български телевизии. На финалните
надписи пишеше нещо като "Гардероб" и отдолу имаше логото на една
марка за дрехи. Марката е българска. Спомням си как бях чел едно
интервю за тази марка и собственичката обясняваше как тази марка
има 200 годишна история започнала в Италия. Оказа се, че марката е
замислена преди не много години и името идва от галеното
наименование на нечий наследник близък до собствениците. Толкова за
автентичността.

Всичко за продан

Преди няколко дни научих, че таксиджиите в София масово карат без един документ, който удостоверява, че са преминали изпит за водач на такси. Изпитът представлявал въпроси за маршрути в София. Поредният днес ми каза: "И триста лева съм давал на ДАИ и (гордо) съм ги изкарвал за един ден)".

Сещам се за една случка преди години - един колега, англичанин си беше харесал българско полицейско яке. Оказа се адски лесно да се намери такова, даже ме врънкаха да си купя и още артикули. Ако не се лъжа за 5 евро направих безценен подарък:

Which stats to trust: Google analytics, Host or WordPress Blog Stats?

I'm using Google Analytics, awstats from cpanel, and a few plugins for wordpress (statpress, wassup). Except Google Analytics they all have unreadable interfaces with a lot of info, that I do not understand.

They all give me different results. I would like to know which one is correct or at least close to the truth. Another problem is Ghostery, which I use - a browser plugin that can block Google Analytics which automatically make its statistics wrong. Recently I was bombarded with requests from Russia and StatPress says Russia is the place where I get most of the requests, which is not right. Until I get an unambiguous answer I'll keep them all running.

What do you think - which gives the best (closest to the truth) stats?

Migrating Google Apps

In this first post I explained how Google Apps account were created to be incomplete (only docs, mail, calendar; no reader, groups, so on) and how I had to create a so called "Google Account" for my Google Apps account that would allow me to access all the google services. At this point this stopps working so I decide to migrate to a newer version of Google Apps that allows its accounts to access all google services. All this happens for my stoynov.com account.

So I start the migration and Google says that my new stoynov.com Google Apps accounts will be able access 62 new services and that I can stop some of them. I allowed them all.

Now it says that there's a conflict between my Google Apps accoung for mihail@stoynov.com and my "Google Account" for the same address. Here's what it says when I logged on gmail.com:

It seems that now my new Google Apps account takes precedence over my Google Account and the latter is now moved to a temporary address. It suggests I check these two links (Address No Longer Available and Not sure what to do?).

The stupid thing is that there's no simple "merge" that could provide a wizard and be done with it.

There are three options - create new gmail account, create new non-google account, do it later. Until then the temp address of the old "Google Account" is mihail%stoynov.com@gtempaccount.com.

Since I don't want a new gmail account and no other account, I chose later.

Then I checked my google groups while logged as mihail@stoynov.com. Google said:

It comes out that Google Groups are not available for the Standard Edition of Google Apps. There seems to be a bug that's described here. For a second I thought that I'd lose access to all the groups and would not be able to receive messages. I quickly made a test. The mail came, so no access is lost.

So now I don't have access to groups.google.com, but at least my subscriptions go to mihail%stoynov.com@gtempaccount.com that redirects to mihail@stoynov.com.

Google messed this up and I intend to mail support so that I could be able to fix this somehow.

P.S. But even when/if it's fixed I would have to call all Groups admins to switch my subscription from mihail%stoynov.com@gtempaccount.com to mihail@stoynov.com.

Another ugly thing from that migration is the inablility to be logged to many mails simultaneously - before this migration I could be logged to mihail.stoynov@gmail.com, mihail@stoynov.com, mihail@work.com; today I can be logged to only one. And the nice "switch account" feature is not working. After going to google.com/accounts it worked:

At least that's working out 🙂

The last thing is the difference between the two profiles - mihail.stoynov@gmail.com and mihail@stoynov.com:

Updates to follow.

Gmail Accounts, Google Apps Accounts and Google Accounts

When I chose Google Apps for my domain (stoynov.com) I created myself a Google Apps account at mihail@stoynov.com. I already had a Gmail account at mihail.stoynov@gmail.com that later became a "Google Account". Google accounts have access to all google services like Reader, Docs, Groups, so on. I wanted to migrate my Gmail account to my Google Apps account and still be able to use all google services. Unfotunately Google Apps accounts have access only to a special "Google Apps" version of Docs, Calendar and Gmail, but no access to Reader and very weird access to Groups.

At some point Google decided that "Google Accounts" could be made with emails other that Gmail. And Google proposed that I create a "Google Account" for my Google Apps account, so I did. So at some point I have the following:
mihail.stoynov@gmail.com - my Gmail account.
mihail@stoynov.com - my Google Apps account for stoynov.com domain
mihail@stoynov.com - my "Google Account".

At some point Google suggested that I create a Gmail account for mihail@stoynov.com and suggested the address mihail.stoynov.com@gmail.com so that my "Google Account" would be "complete".

Now what does "complete" mean? Well, here comes the "issue" with google groups. I had been subscribed to many google groups and to some I had admin privileges and to some I didn't. When I created mihail@stoynov.com I wanted to move my subscriptions from mihail.stoynov@gmail.com to the new account. Well, this happened to be harder that I thought. First, non "Google Accounts" don't have access to the web interface of Google Groups (groups.google.com) and thus cannot be admins to such groups. So then I subscribe to these groups with my mihail@stoynov.com "Google Account". And at some point there was a Google Group with the following subscriptions:
mihail@stoynov.com (referring to my Google Apps account)
mihail@stoynov.com (referring to my "Google Account")

There's one other stupid thing - I couldn't have a picture to my "Google Account", because I didn't have a Google Profile. Google Profile looked like a personal page with a lot of personal info. So I chose not to have a picture. But I digress.

This was all working ok, even though it was really stupid, but at some point Google Apps' version of Google Docs didn't work ok with my iPhone and said that I have logged with the wrong account. And then I checked the admin panel of my Google Apps and it said something like "Google is changing, you can migrate your Google Apps to a newer version that would allow you to have access to all Google services. And I said, well finally. Google Apps should have been like this from the start.

Now follows part 2 that explains the migration.

I so very much hate Windows Live Writer

I thought I had found the holy grail of blog-writing interface and that it's name is WLW (Windows Live Writer).

WLW does a lot of things (check out the link) but it crashes a lot, it's so very slow, and it requires a VM.

I'm looking for an alternative. Please tell me one if you know.

How is it that all laptops are with DDR2, only Apple goes to DDR3?

Most currently sold laptops are with DDR2 memory. Even the high-end ones, like Sony Vaio. It would seem that only Apple sells its current line of laptops (the aluminum body ones) with DDR3.

Why is that? Why isn’t there other high-end laptop with DDR3? It would only make sense to make it faster with DDR3. Or maybe it wouldn’t make it faster? I checked it out.

This is an excerpt from a post in the forum of macrumors.com

The polymac has 2gb of DDR2 @667mhz much like it's predecessors. The aluminum mac has 2gb of DDR3 @1067mhz. At first glance you might say WOW! 1067 is a lot more megahertz than 667! I gotta have that.

This doesn't figure in 3 things.

1. DDR3 increases speed at the penalty of higher latency. In real life terms, lets simplify it a lot and say that DDR2 and DDR3 are cars, and that the top speed of DDR2 in this case is 66 mph and the top speed of DDR3 is 106mph. But DDR2 has lower latency than DDR3, so lets say DDR2 only has to drive 5 miles and DDR3 has to drive 8 miles. So if the speed were the same it would take DDR3 longer cause it has a longer way to drive. DDR3 makes up for it by driving faster, and as you can see the faster you can get DDR3 the less difference the latency makes (i.e. that 3 miles makes less over all difference when you drive 160mph i.e. DDR3 1600mhz (no not available on macbook)) What this does mean though is that at lower speeds of DDR3, there isn't much benefit as the extra latency makes the performance very similar.

2. According to others you can upgrade your ram to DDR2 800mhz
http://forums.macrumors.com/showthread.php?t=651330&highlight=ddr2+800
http://discussions.apple.com/thread.jspa?threadID=1877953&tstart=0

Now let's go back to point 1. Now if DDR2 can go 80mph over 5 miles vs. DDR3 going 106mph over 8 miles, there's probably even less of a difference.

3. The last and most important thing to remember is that computer performance is tied to all the hardware, and is bottlenecked by some things far more than others. In some benchmarking between DDR2 800mhz and DDR3 1067mhz on a PC with virtually identical hardware otherwise, the bandwidth increased from 6146 to 6613... or about 10%. Which sounds alot faster. But then they performed other benchmarks, such as super pi, which showed that
the DDR2 800mhz finished in 46.08 seconds and the DDR3 1067mhz finished in 45.11 seconds. The difference is 0.97 seconds or a whopping 2.1% performance boost.

The guy even supplied a lot of benchmarks:

To further illustrate this here are some benchmarks with the old polymacbook vs the new aluminum macbook

http://eshop.macsales.com/shop/Memory_Benchmark/Apple_MacBook/

To better demostrate apples to apples, (no pun intended we'll look at the 2.4 ghz macbook aluminum vs the 2.4ghz polycarbonate) in photoshop CS3

Lower time is better
Macbook Aluminum 2GB ram 99.34
Polucarbonate macbook 2GB ram 107.63

which shows that the macbook aluminum is faster 1067 vs 667 here.

But what happens when you upgrade to a 320gb 7200 rpm drive?

Macbook aluminum 2gb ram stock 99.34
Macbook aluminum 2gb ram 320gb 92.28

how about when we upgrade the ram?

Macbook aluminum 4gb ram stock 79.06
Macbook aluminum 4gb ram 320gb 77.19
Polycarbonate macbook 4gb 78.41

Then the guy continues with comparing prices of the two macbooks.

Source: http://forums.macrumors.com/archive/index.php/t-654277.html

Since this is a forum post, one has to check the validity of the statements. So I went to wikipedia. This is what I found out:

CAS (column address strobe) latency (CL) is the delay time which elapses between the moment a memory controller tells the memory module to access a particular column of memory on a DRAM memory module, and the moment the data from given array location is available on the module's output pins.

In asynchronous DRAM, the interval is specified in nanoseconds. In synchronous DRAM, the interval is specified in clock cycles, and must be multiplied by the cycle time (i.e. divided by the clock frequency in GHz) to convert to nanoseconds.

[…]

Because they have multiple internal banks, and data can be output from one during access latency for another, the output pins can be kept 100% busy regardless of the CAS latency; the maximum attainable bandwidth is determined solely by the clock speed. However, that only applies if the data to be read is known long enough in advance; if the data being accessed is not predictable, the latency matters. For a completely unknown memory access, the relevant latency is the time to close any open row, plus the time to open the desired row, followed by the CAS latency to read data from it. Due to spatial locality, however, it is common to access several words in the same row. In this case, the CAS latency alone determines the elapsed time.

[…] Note that memory rated for a certain maximum speed can always be operated at a lower clock rate. The CAS latency can be set lower in such a case. […]

[Then there’s a table showing how DDR3@1066Mhz has a CAS latency of 7 cycles and DD2@666Mhz – of 5 cycles]

Source: http://en.wikipedia.org/wiki/Memory_latency

So the guy in the forum seems to be correct.

One thing remains unfolded though – why is the latency higher with higher speed? This is not explained in either the wiki, or the forum post. And unfortunately I don’t have the time to investigate.

If someone knows, please share.

This brings me to the reason I investigated all that - I have a spare 2x 1GB DDR@1066 Mhz:

2009-11-17-21.04.30_176.0_4.0_41.0

(I guess no one will want them because only Macbook guys have machines with DDR3 and the minimum for them is 2GB)

I have high hopes for the 160GB-5400rpm-Hitachi harddrive though.

2009-11-17-21.04.21_175.0_3.0_40.0

If someone is interested, please let me know.

Oracle on linux: changing the hostname messes up with Oracle

There’s this Oracle 10g R2 database. It’s installed on SUSE. The version of the SUSE as far as I know is 11.1. We had to change the hostname of the linux machine (some corporate standards). Changing the hostname made Oracle unusable. It started on startup, but could open port 1521 and still thought it is on the old hostname. “/etc/init.d/oracle-xe status” said things are not working, even though the processes started without an error. port 1521 was not opened. It was strange that the startup script didn’t say something is wrong. It was strange that the db could be used locally by oracle’s command-line tools ( I guess via pipes since the port hadn’t been opened).I tried Google the issue, but fruitlessly. Then I tried to figure out where did Oracle keep the old hostname, but the directory structure of Oracle is not that easy to understand. Being desperate I tried searching the whole hard-drive for a specific string:

grep –r “old_hostname” /

After 24 hours I gave up.

Solution 1

Being desperate and developing on another temporary oracle server, we decided to give up corporate naming strategies and to return the old hostname – IT WORKED.

Solution 2

By chance I saw that the old hostname was used in tnsnames.ora and listener.ora. Being stubborn I changed the hostname to the one we wanted to use and edited both .ora files. It worked. I hate Oracle.

Google Calendar App on Android

On Android the Google Calendar app synchronizes with all the calendars from the gmail account. However it has an extra calendar called “My Calendar”. This calendar is the default one and is not synchronized.

So if one creates an appointment with default settings, this appointment will not be synchronized. Lame.

This calendar can neither be switched off, nor can it be made not default.

Super lame – I need everything to be sync’ed.

-4.2

So there’s this business trip that’s very important for our current project. The night before we depart I get the feeling I’m going to get sick. So I buy the usual stuff I use in these situations to avoid getting sicker.

But this time it’s different: only in a couple of hours I turn into a vegetable. But the boss says that this thing is very important for our future, so I promise him that I’ll take another handful of drugs and be ready in the morning. The night is hell. The next morning I’m late. The boss is angry.

Just as we leave the city there’s this minor car accident with another car. It’s too small to report. But the boss is stubborn. We wait for a couple of hours for the traffic police, which are stranded a few kilometers away trying to remove a bus from the speed lane.

They arrive, my boss is not very cooperative, I’m still a vegetable. They say they have to drag him to police HQ to do some stuff.

Finally they let us go and after a long trip we go to where we’re headed. I sleep for 11 hours – still the night is hell. We do our business the next day and go back.

There’s this problem with the brakes of our vehicle so we stay another couple of hours somewhere in the middle of nowhere to fix it.

Finally we’re back. The boss wants me to do some presentation the next day – I say NO, I need to get better first !!!

For these two days all I ate was one fried egg and half a little of water.

The final result is:

-4.2kg

Google Android’s Contacts application deletes contacts while synchronizing with gmail - solution

So there’s this Android phone. It’s a HTC Magic.

It has a special app called Google Contacts. And I found a problem. That when I add a contact and then synchronize it with google servers it would make the contact disappear.

I found out why. When Google Contacts application first contacts a google account it make a new group called “Phone Contacts”. And there are all the contacts from the phone. There are other contacts in your gmail account mostly emails, so you don’t want them as contacts in Google Contacts, right? But they are there by default because the sync-ing downloads all the contacts from gmail.

There’s an option to choose which group to sync – all or just “Phone contacts”. I chose “Phone contacts”.

Now, why does sync-ing make the contact disappear? Well, because Google Contacts application creates it by default in “My Contacts” group. Then it uploads it to gmail and removes it from the phone’s Google Contacts application.

The solution is to move all phone contacts to “My Contacts” and sync only that group.

(I don’t think that it would work with “Phone Contacts” group, because when creating a contact with the phone’s application it does not ask in which group to put the contact).

Best of luck to all.

The worst work week ever

This post is from the series “Imagine a project” 🙂

So, imagine a project where there’s a deadline for acceptance tests. These tests would determine whether the project is successful (the client accepts it) or it is not. Now, imagine that this project is behind schedule. It’s been behind schedule for as long as you’ve been working on it.

So this deadline is a week away from this fictional current moment. There are a couple of things that have to be implemented. These things are doable, but what happens instead:

  • First, a power surge, nothing serious, just a couple of hours.
  • Then, the data center is down for a couple of hours, again nothing serious.
  • Then, there’s no internet for 5 hours – it comes out that the main route for the ISP to the office is down due to a power surge.
  • Then a very important server that is already in production blows up – and there’s no backup system to take it’s place. Yes, I know, mea culpa – it’s our fault that we didn’t (and still don’t) have a recovery plan.
  • Then out of a sudden the most important person in the project goes to a vacation for 2 (two) full days without any prior notice, and this is 2 (two) days before the acceptance tests.
  • Then the internet goes down again for half a day, and the ISP says it’s going to be down the day after it, AND it could be down on the day of the acceptance tests, so the maintenance team could not be able to monitor the servers.

What does the team do?

  • First it rewrites the software module on the blown server, so it could be hosted on one of the other servers. Only in a couple of days.
  • Then the whole team moves to another location with internet so that the work could go on.
  • Then it renegotiates with the ISP that the downtime be after the acceptance test.
  • Then it works it’s ass off so that the project could stand a chance.

What kind of a great team is that?

What kind of magicians can pull this off?

And then the boss says the team is unprofessional. Make him read this!

Мирзакарим Норбеков и вярата в шарлатани

Пиша този пост на български, защото ще цитирам разговори на български.

Та майка ми е луднала по Мирзакарим Норбеков.

Днес реших да се разтърся и ето какво й написах:

Това е страничката за Норбеков в уикипедия:
http://en.wikipedia.org/wiki/Mirzakarim_Norbekov

Накратко там пише, че е Узбекистанец и твърди, че може да лекува болести на очите и белези.
На няколко места пише, че заблуждава читателите си с титлата Академик и с други титли, с изследванията си върху еритроцитите (червените кръвни телца) и некви други неща.

Пише, че върху неговите практики няма много изследвания, но пък има изледвания като цяло върху разни източни практики от алтернативната медицина и че Норбеков копира дословно от тях. СЗО (Световната здравна организация) казва, че тези практики като цяло са полезни за здравето.

Та Норбеков е малко шарлатанин и послъгва за научните си успехи, но като цяло практиките му са по-скоро полезни за здравето (СЗО).

Хубаво е да се чете от различни източници.

Тя прие това като заяждане и ми отговори доста гневно:

Мишел, не пращай човека дръзнал да помисли за зрението си, за зелен хайвер.
Вместо да чете разни популярни издания, нека да получи информация директно от източника (курсовете, книгите, учениците).
Научи се да получаваш информация от източника, когато това е възможно. Освен всичко друго той е завеждащ катедра по палингенезия в Международната академия по форматизация към ООН. Откога и в САЩ започнаха да дават високи постове на шарлатани. И там ли имало корупция? И защо му правят този подарък?
Ако искаш да си в час посети някой от мероприятията в София или прочети книга, ако ли не, не вземай отношения по неща за които не си компетентен.

Моят втори отговор и надявам се край на кореспонденцията:

Странно защо като напиша в гугъл "международна академия по форматизация в ООН" ми излизат само страници за Норбеков. Тая академия сайт няма ли си? Нищо ли не пише в интернет за нея? Дори и на английски го търсих - "International Academy of Formatization of UN" и пак само страници за Норбеков излизат.

И какво, по дяволите, означава форматизация. Търсих само думата форматизация и пак само страници за Норбеков. Според гугъл подобна дума не съществува (гугъл има специално търсене за термини и се търси така: "define:formatization" или "define:formatisation").

Норбеков не е първият човек, който е помислил за зрението си. Стига глупости.

Просто не идеализирай нещата. Започни от фактите. И под факти разбирам не само нещата написани в книгите му.

В тая връзка ще ви разкажа една история. Преди време един приятел ми препоръча курс за бързо четене. А момчето умно и си казвам защо пък не. И отиваме при един измамник, който за 150 лева ни проведе 2 седмичен курс като гледахме разни малоумни картинки, за да сме си разтягали зрението и т.н.
Упражнения правихме за очите, които бих казал, че бяха полезни, но не за бързото четене.
Та накрая никой от нас не можеше да чете бързо. Сигурно с Норбеков поне получаваш нещо ценно.

Едно е да вярваш в Господ. Съвсем друго е да отричаш Еволюцията и да твърдиш, че земята е плоска.

iReport 3.0.0 on Mac OS. How to make it work?

iReport is a gui for designing jrxml (the actual reports) files for JasperReports. It is supposed to work on any platform.

We’re using 3.0 instead of 3.5 because 3.5 is based on Netbeans.

I’m trying to work with it on Mac OS (it was extremely slow in the virtual machine, something to do with java I guess).

First:

chmod u+x iReport.sh

…because it’s not executable.

But then it gave me a weird error:

comp:iReport-3.0.0 user$ ./iReport.sh
-bash: ./iReport.sh: /bin/bash^M: bad interpreter: No such file or directory

Google said it’s because of the problem with newline in different platforms. In linux it’s LF (\n)(line feed). In windows it’s CRLF (\r\n) (carriage return, line feed).

So this ^M character appearing in the error is actually the left-out CR.

How to fix it? Wikipedia says:

tr -d '\r' < inputfile > outputfile

This works. But then the next error. iReport.sh calls bin/startup.sh.

The same thing for it.

That’s it. Why was the shell script in a dos format only god can tell.

Note that iReport on a Mac should be in a place whose path does not involve spaces. Here’s a solution for that too.