Feb 19 2016

I’ll just leave this here

Category: TechnicalIuliana @ 10:41

Jan 06 2016

This is what I do

Category: English posts,TechnicalIuliana @ 22:25

When everybody was going on vacation me and a few other colleagues, stayed behind in order to perform the migration from CVS to Git of our very large project. We used the wonderful cvs2git tool, although a lot of internet reports say that the results are unpredictable. The same thing I mentioned during the preparatory meetings, but for the first time since I work in this company apparently there were people that were more optimistic than me, because on the 23rd of December the migration began. A little bit earlier than everybody expected, but oh well…


We had one big CVS repository, so the first step to do was to restructure our project and split it into little ones that could be easily migrated. Issue was, that one project could not be split. And that was the one that caused a lot of trouble. When I am writing this post, that project is still being migrated. And is migrated a little different than others. Each branch of the CVS repo, becomes a Git repo. Then all these repositories will be merged into one. And all my colleagues recommended me to use this and that, a lot of shell and git commands found on stackoverflow, I had the genius spark to merge these repositories in an instant using multiple remotes. I’ll write more about this in a later post.

Before the vacation started, I trained my colleagues in using Git. If you would ask me, the training was quite a fiasco, because I had only 2 hours per group to explain them what Git is, what are the differences between CVS and Git, how Git works internally, what GitBlit is, how to work with Git using Eclipse and his stupid EGit plugin and how to work around its mishaps. As you can imagine 2 hours were not enough, but it is what it is, I had to work with the resources I was allocated. Knowing exactly how the training went, I took advantage of the free days I had and I slept a lot and prepared myself mentally for 6 months of  answering repetitive, sometimes ridiculous Git questions. I mean, I am expecting for my colleagues to have the most weird questions and I am expecting for them to do the most weird things with Git.

And now, this is the first week. And my responsibilities do not cover only Git consulting, but my project manager is on vacation so I had to take his responsibilities as my own, I had to deliver a fix and I had to prepare the hotfix package for testing and delivery and also help people in the company to update their release/hotfixes scripts to use Git. Fortunately, the hotfix was ready, was tested and will be delivered at the end of the week.

But today a serious problem emerged. People were unable to work with the remote repositories. They got a lot of timeouts, and nobody knew the cause. Logs did not say anything related to that. So we started analyzing everything it could affect this.

We started with GitBlit, all looked fine in the GitBlit.properties file, all ssh properties were set with appropriate values.

Most of us were using the ssh protocol to communicate with the remotes, so we needed to check how many ssh connections the server could handle in parallel. SSH works over TCP, so the  number of TCP connections was just as relevant.

# cat /proc/sys/net/core/somaxconn

And it was a small damn one. It was increased to 1024. And it seemed to work for a while, but as soon as everybody started cloning, pulling and fetching, the problem reappeared. So this was clearly not it.

I then started to look at the SSHD server installed on the server. There were two parameters that interested me: MaxSessions(specifies the maximum number of open sessions permitted per network connection) and MaxStartups(specifies the maximum number of concurrent unauthenticated connections to the SSH daemon. Additional connections will be dropped until authentication succeeds or the LoginGraceTime expires for a connection) Both were commented in our /etc/ssh/sshd_config file, so I guess the default value of 10 was used for both of them. So both were set to 1024. (Yes I like this number)

I restarted the sshd service and again for a while everything looked fine. Then the timeouts started again. I started to think that maybe GitBlit did not close the conections successfully and that is why the 1024 quota was reached and timeouts happened. So I started looking at Gitblit again. After some research into each of its properties I found this one:

# The default size of the background execution thread pool in which miscellaneous tasks are handled.
# Default is 1.
execution.defaultThreadPoolSize = 1

And you probably suspect by now… it was modified to 1024. I restarted the Tomcat hosting the GitBlit installation and… voila. Remote operations are now working for my colleagues. Apparently remote operations using the ssh protocol are miscellaneous tasks.

I was doing all these things, while consulting people about Git and my close colleagues were amazed at how serene I was and how well I was handling it all. Actually I think I was a little amazed too, but then I realized that there is nothing to be amazed of. I was prepared for this, I was expecting a hell of confusion and people running around like Dexter(the cartoon character) when his hair was on fire. I was prepared because I am good at this job and because this is what I do.

Tags: , , , ,

Dec 12 2015

What is testing?

Category: English posts,TechnicalIuliana @ 22:29

Testing is …

  • is the process used to reduce the likelihood of a failure that undertaken in a professional manner warranties that the software meets all specified user requirements  when it is delivered.
  • an exercise in risk management and reduction.
  • is a measure of quality.
  • is the process of executing a program with the intent of finding failures.
  • is a process involving static and dynamic actions in order to identify defects.
  • is the process of exercising software to detect errors and verify that it satisfies specified functional and non-functional requirements.
  • is the process of exercising software to verify that it satisfies specified requirements and to detect errors.
  • is the process consisting of all life cycle activities, both static and dynamic, concerned with planning, preparation and evaluation of software products and related work products to determine that they satisfy specified requirements, to demonstrate that they are fit for purpose and to detect defects.(ISQTB definition)
  • is the process used by testers to destroy developers sense of self esteem.
  • is the process used by testers to destroy confidence in the application.
  • is the process used by testers to help developers grow technically, develop their characters and learn to accept negative feedback.

Oct 09 2015

Just dev things

Category: TechnicalIuliana @ 16:46

After receiving an email from MyEclipse that begged me to renew my license, I got a little creative. Click on each image in order to enlarge it.
small_eclipse small-love-intellij

Julie pic source

Aug 26 2014

Setting up a PPPOE connection in Fedora 20

Category: TechnicalIuliana @ 11:21

I just moved to a new city and yesterday an internet provider representative came to visit to set up my internet access. Until singing with this provider I was never concerned with the type of internet connection I had. Also, always being behind a server/router made sure I would never bothered with this. But I remember my friends which had internet from the same ISP, they had to set up on Windows something called an PPPOE connection and an username and password was required.

I did not realized that I will be needing that type of connection too until the ISP representative was here the previous evening, so while he was finishing the papers I searched on my mobile how to do that on Fedora. Apparently it is quite easy but there are a few catches, so even if you find the instructions easily on Google I will be writing about it here, just in case anybody else needs to know this. (This will be most useful for Linux Romanian beginners which want to sign up with the RDS ISP and have dynamic IPs)

The command to set up a PPPOE connection is pppoe-setup. To use it you need to be root. So open a terminal and log in with the root user. Then execute that command and step by step you will be requested the following:

  • Login name: [insert the username provided by your ISP]
  • Interface: [insert here the name associated to your network adapter, usually it is eth0 so you can go ahead and just press <Enter> to use the default, but in some cases like mine, you have to open another terminal and check your network adapter name using the ifconfig command – in my case the network adapter is called p2p1]
  • Demand activate the link: you will see some text explaining the options you have, the paragraph starts with “Do you want the link to come up on demand, or stay up continuously?” and the default option is for this link is not to be activated on demand. In case of a  dynamic IP you would preffer for your link to stay up permanently, so you will insert  no.
  • IP address of your ISP’s primary DNS server: [this is the tricky one, most people just hti <Enter> and go with default, but in case of a dynamic IP which will be provided by a server so the option you need so insert is server ]
  • Password: [insert here the password provided by your ISP, you will be asked to introduce it twice]
  • USERCTRL:[insert yes, to give access to the normal user to use the connection]
  • FIREWALLING:[you have three options here, but you have Linux and a dynamic IP so you do not need a firewall –  insert 0]

The very best thing about the pppoe-setup is that every option you have comes up with a complete explanation on what it means, so all you need to know basically is the name of that command, everythign else you can read while setting up the configuration. After inserting all necessary data, you will be told how to start, stop or view the status of your connection

Congratulations, it should be all set up!

Type '/sbin/ifup ppp0' to bring up your xDSL link and '/sbin/ifdown ppp0'
to bring it down.
Type '/sbin/pppoe-status /etc/sysconfig/network-scripts/ifcfg-ppp0'
to see the link status.

So just do that, execute /sbin/ifup ppp0 and indeed you should be all set up. If you encounter problems, please let me know via comments, I am am always eager to learn new things and I love challenges. :)

Tags: , ,

Feb 09 2014

What java and vlc do to your computer when ran together

Category: TechnicalIuliana @ 11:25


Results from cat /proc/cpuinfo:
4 x

vendor_id	: GenuineIntel
cpu family	: 6
model		: 37
model name	: Intel(R) Core(TM) i5 CPU       M 480  @ 2.67GHz
stepping	: 5
microcode	: 0x4
cpu MHz		: 2667.000
cache size	: 3072 KB
physical id	: 0
siblings	: 4
core id		: 2
cpu cores	: 2
apicid		: 5
initial apicid	: 5
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr
 sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc
 aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt lahf_lm ida arat
 dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips	: 5321.30
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual

Results from cat /proc/meminfo

MemTotal:        5973056 kB
MemFree:          287364 kB
Buffers:          283604 kB
Cached:          1446940 kB
SwapCached:        43652 kB
Active:          3517056 kB
Inactive:        1668528 kB
Active(anon):    2678664 kB
Inactive(anon):   841940 kB
Active(file):     838392 kB
Inactive(file):   826588 kB
Unevictable:          28 kB
Mlocked:              28 kB
SwapTotal:       8191996 kB
SwapFree:        7899416 kB
Dirty:               132 kB
Writeback:             0 kB
AnonPages:       3424548 kB
Mapped:           194148 kB
Shmem:             65564 kB
Slab:             247620 kB
SReclaimable:     210876 kB
SUnreclaim:        36744 kB
KernelStack:        4968 kB
PageTables:        52676 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    11178524 kB
Committed_AS:    7064468 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      365944 kB
VmallocChunk:   34359318848 kB
HardwareCorrupted:     0 kB
AnonHugePages:   1083392 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      566520 kB
DirectMap2M:     5584896 kB

Yeah … I need a new workstation, because the current one is definetly deprecated.

Sep 18 2013

The repetitive programmer

Category: TechnicalIuliana @ 12:36

You know who you are. I know who you are. And I hate you. And I despise you. Every time I have to  work with your code my brain keeps screaming WHY? WHY?WHYYYYYYY?  and I begin to think you are retarded. Or maybe just not retarded, but maybe you learned to program on another planet, because no programmer from this Earth, not even a mediocre one would write code like you do and also be paid for it. I would not pay you for it, I would send you do dig holes or clean shit pipes or something that does not imply any brain power whatsoever. Because you have none!


// [bla bla  bla - code that I won't put here]
final ByteArrayOutputStream bos = new ByteArrayOutputStream();
try {
	Document document = new Document(PageSize.A4);
	PdfWriter writer = PdfWriter.getInstance(document, bos);
        // [bla bla  bla - code that I won't put here]
	if (document != null) {
	if (writer != null) {
        // [bla bla  bla - code that I won't put here]
        OutputStream outputStream = new FileOutputStream(attachmentURL);
        // You might notice that the outputStream was not closed
} catch (MailException e) {
        if (log.isWarnEnabled()) {
                log.warn("Cannot send email for something " + something.getId(), e);
	sendAdminMessage("Error sending email message to user", "Cannot send email for something nr "
			+ something.getId() + ". Message is = " + e.getMessage());
			return false;
} catch (MessagingException e) {
	if (log.isWarnEnabled()) {
		log.warn("Cannot send email of something " + something.getId(), e);
	sendAdminMessage("Error sending email message to user", "Cannot send email for something nr "
			+ something.getId() + ". Message is = " + e.getMessage());
			return false;
} catch (IllegalArgumentException e) {
	if (log.isWarnEnabled()) {
		log.warn("Cannot send email ofsomething " + expressOrder.getId(), e);
	sendAdminMessage("Error sending email message to user", "Cannot send email for something nr "
			+ something.getId() + ". Message is = " + e.getMessage());
			return false;
} catch (MalformedURLException e) {
	if (log.isWarnEnabled()) {
		log.warn("Cannot send email of express order " + something.getId(), e);
	sendAdminMessage("Error sending email message to user", "Cannot send email for something nr "
			+ something.getId() + ". Message is = " + e.getMessage());
			return false;
} catch (IOException e) {
	if (log.isWarnEnabled()) {
		log.warn("Cannot send email of something " + something.getId(), e);
	sendAdminMessage("Error sending email message to user", "Cannot send email for something nr "
			+ something.getId() + ". Message is = " + e.getMessage());
			return false;
} catch (DocumentException e) {
	if (log.isWarnEnabled()) {
		log.warn("Cannot send email of something " + something.getId(), e);
	sendAdminMessage("Error sending email message to user", "Cannot send email for something nr "
			+ something.getId() + ". Message is = " + e.getMessage());
			return false;

So, 7 catch-es, for seven types of exceptions, we do the same thing for every type of exception, write the same code, because it looks good in the SVN if somebody looks, he will see that you wrote a lot of code. A lot of crap more like it. And why the hell do you not make sure all your streams are closed??
The person who wrote this code is payed a few thousand euros to write code like this. Yeah, I guess the recruitment department sucked ass when this person was hired.

So yeah, if you write code like this, quit programming now and look for another job. You clearly are not made for this and you are a despicable person.

Tags: ,