7. dubna 2017

2016 13" MacBook Pro w/o TouchBar

I would like to summarize my thoughts about 2016 13" MacBook Pro w/o TouchBar.

I'm MacBook Pro user since 2011 - it's not long time, but even though I had a chance to try different machines:
  • 2011 13" MacBook Pro (my own machine)
  • 2011 15" MacBook Pro (company machine)
  • 2013 13" Retina MacBook Pro (my own machine)
  • 2014 13" Retina MacBook Pro (company machine)
  • 2016 13" MacBook Pro w/o Touch Bar (company machine)
Almost every time, switch to newer machine provided was a great experience - faster CPU, Wi-Fi, more RAM, ...

But latest upgrade is more downgrade than anything else. Here is why:
  • No MagSage - as my laptop is NOT desktop replacement, I'm using it in lot of strange positions. In those positions MagSafe safely disconnected from laptop when there was any pressure on it. With USB-C I'm risking port damage...
  • Only 2 USB-C ports - 13" rMBP has 2 Thunderbolt 2.0, HDMI, 2x USB 3 ports... I don't have problem with USB-C, but 2 is not enough (and I know that TouchBar variant of this machine has 4 USB-C, but two ports on right hand side are crippled -- slower)
  • CPU - when maxed out, it's clock is 2.4GHz, not much in comparison with previous one I had - 3GHz... New machine is noticeably slower than previous one...
  • Wi-Fi - there is 802.11ac support, but limited to 867Mbit/s. Again, this is downgrade when compared to previous one - it supported 1300Mbit/s...
  • Keyboard - I have few complains about new keyboard:
    • It's very noisy, cannot work in bed room...
    • Some keys are very hard to press since day 1...
  • Missing optical-out through headphone jack
  • Strange audio
    • Headphones volume - I'm not able to setup comfortable volume when using Apple EarPods, even lowest settings before mute is too loud
    • Speakers - I hate fake speakers grilles. Multiple reviews mentioned that speakers are better than on previous generations, from my perspective only difference is that they are louder.
On other hand, there are some real upgrades:
  • Better & huge Trackpad
  • 512GiB SSD - previous one was 256GiB
For few things, I'm not sure whether it's better or not:
  • Form factor. On one hand, it's smaller and I like it, but on cost of battery performance. I would prefer keep previous FF and improve battery life.
  • New default HiDPI default - 1440x900. Real resolution is 2560x1600, so multiplication factor is 1.77777777... Not ideal in some situations. But on other hand, it provides "more" working space.
Next time, I'll probably get machine from another vendor as Apple obviously forget about some PRO users...

30. ledna 2016

Jenkins workflowpipeline-multibranch

Jenkins workflowpipeline-multibranch seems to be great approach for creating and managing build per branch. In situation when you have a project with tens of branches in repository and you need to build any of them it's not easy to manage it. It's not unusual that some branches requires different steps/environment for build. Few options how to handle it are listed bellow.

Generic job for all branches:

  • Pros
    • One single job you have to care about
    • Easy to create, as branch selector is *
  • Gotchas
    • Mixed change log for all branches
    • Some branches might require special handling and generic script does not support it -> complicated job script, change of job script might brake another branch
    • In most cases job script is not versioned with project, complicates build of older revisions

Branch specific jobs:
  • Pros
    • Every branch can use its specific build script
    • Readable change log, separate for each branch
  • Gotchas
    • Creation & management is time consuming (even with scripts around)
    • In most cases job script is not versioned with project, complicates build of older revisions

workflowpipeline-multibranch:
  • Pros
    • Scans repository for branches and creates job for each branch with Jenkinsfile in repository root
    • Script file is part of project repository, versioned with code, so when you need to build older version all you have to do is checkout older version source code
  • Gotchas
    • Jenkinsfile is required on Jenkins master before jobs starts, so every branch has it's own repository replica on Jenkins master (disk consuming for big repos with lot of branches!)
    • Due to repository replica on jenkins master, you have to pull changes twice. First time for master (to get current Jenkinsfile), second time on slave (if any) to work on top of source code.
I would like to go with pipeline-multibranch approach, but storage costs a pretty penny. So I'm looking for good mix of Pros/Gotchas for new build environment where one of git (~800MiB) repos contains 100+ active branches (=> 80GiB storage required just for pipeline-multibranch), where we need to have different build scripts for them. And even worse for each branch we need to build for 5+ targets and two different configurations (this nicely fits to parallel in pipeline/or multi configuration build).

I cannot find any example of more complicated pipeline/Jenkinsfile, but will be glad to see one.

27. února 2015

Relokace do USA

Je to již druhý měsíc co žiji v zahraničí a tak je nejvyšší čas napsat něco o tom jak probíhala samotná relokace, víza.

1. června 2011

Jak O2 nefunguje zahraniční konektivita

Při pokusu otevřít stránky apple.com ve večerních hodinách přes síť Telefonica O2 končím na nemožnosti spojit se se serverem.

$ ping -c 10 e3191.c.akamaiedge.net
PING e3191.c.akamaiedge.net (2.21.13.15): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
64 bytes from 2.21.13.15: icmp_seq=2 ttl=54 time=185.296 ms
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6
Request timeout for icmp_seq 7
Request timeout for icmp_seq 8

--- e3191.c.akamaiedge.net ping statistics ---
10 packets transmitted, 1 packets received, 90.0% packet loss
round-trip min/avg/max/stddev = 185.296/185.296/185.296/0.000 ms


Čas změnit lokál, tedy internet providera. BTW, ve stejném čase při pokusu otevřít inkriminované stránky přes 3G od Vodafone vše v pohodě - tedy nebude to chyba na straně poskytovatele obsahu, ale ISP. Že by souvislost se spuštěním VDSL?

26. dubna 2010

Jak databázi nepřidávat práci

Procházel jsem log soubor databáze a díval jsem se na dlouho trvající SQL dotazy. Několik jsem jich našel a většinou se shodovaly v jedné drobnosti – přidávaly databázi zbytečnou práci:


....
t.datum + '30 days'::interval > now()
....


O co v tomto případě jde? Dejme sloupec datum typu TIMESTAMP, od informace uložené v tomto sloupci odečítáme interval 30 dnů. Tím jsme znemožnili využít index nad sloupcem datum a také pro každý řádek znovu vyhodnocujeme výraz now().


Jednoduchou změnou lze dotaz znatelně zrychlit a navíc mu umožníme použít index nad sloupcem datum:

...
t.datum > 'now'::timestamp - '30 days'::interval
...


Také 'now'::timestamp - '30 days'::interval je vyhodnoceno pouze jednou, není třeba znovu počítat pro každé porovnání.

21. ledna 2010

Záhadné ClassCastException

Až Vám bude java poskytovat podobně záhadné výjimky, zkontrolujte, že nemáte některé třídy natažené 2x (například 2x natažená knihovna, jednou v Aplikačním serveru, podruhé ve spouštěné aplikaci):


java.lang.ClassCastException: org.medoro.util.scheduler.ProcessScheduler cannot be cast to org.medoro.util.scheduler.ProcessScheduler
at org.medoro.util.scheduler.LeskJob.getScheduler(LeskJob.java:59)
at org.medoro.util.scheduler.LeskJob.contextInitialized(LeskJob.java:90)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:645)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:189)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:978)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:586)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:349)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.deploy.ContextDeployer.deploy(ContextDeployer.java:341)
at org.eclipse.jetty.deploy.ContextDeployer.access$000(ContextDeployer.java:66)
at org.eclipse.jetty.deploy.ContextDeployer$ScannerListener.fileAdded(ContextDeployer.java:88)
at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:412)
at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:326)
at org.eclipse.jetty.util.Scanner.scan(Scanner.java:282)
at org.eclipse.jetty.util.Scanner$1.run(Scanner.java:234)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)

16. října 2009

Změna tapety na ploše



Inspirováno článkem na LinuxExpress.cz.

KFingerManager and KDMFprintPlugin in KDE svn

Since Wed, 14 Oct 2009 17:40:51 +0800 is source code of KFingerManager and KDMFprintPlugin part of KDE SVN.

I am sick because of this commit was not done by me (I dont backup .ssh from my work laptop and I must change ssh key). My thanks to 潘卫平(Peter Pan) for this commit.