by the time i was there it was located here, and now it’s here.

it was my second company i’ve been in, but the first huge and international one !!

my internship was as Testing Software Engineer, writing unit tests on JUnit framework, of course with JAVA for the CHS project.

kind of i was pretty amazed by that product and the system that was followed there, very organized company indeed.

plus i was working with ZIZO on the same team, and seen how effective he was (fact) and how early does he come to work D !!

i think i’ve learned so many things there.

working on such big project, the tools i’ve used there (code editor, source control, etc..) and working with such nice team..

besides there i felt that i should start hating outlook D , duno why.. but it was just that !!

i really don’t think that i’ll forget the environment there especially those two marketing engineers beside the window D , they are both awesome guys !!

and of course the caffeine geek who was beside me, who introduced me to Ubuntu, although the DVD he gave me was corrupted but he encouraged me much to try it D

and every one of the rest in the team affected me somehow, really !!

i can remember that the team was called IESD or some combination of those four chars..

at the end, this company has a very good working environment, with a nice organized team, working on a big cool product.

for me it really deserved staying in Cairo for that 1.5 month !! D

the only thing i hated there is the transportation, that took +1.5 hours daily to get there or to get back home :S

but anyway, thats how i could finish more that 3/4 of Code Complete 2 in less than a month, while going back home from there D D .

Tagged: Cairo, Geek, Internship, JAVA, Mentor Graphics, Outlook, Ubuntu





This company is located in El Maadi, here

and that was the first company I’ve been in, that was internship, i lasted there for a month.

it was a small company, we where 8 developers there during that time, but they’ve increased now.

it had relatively good projects and clients

the thing that made me very happy in the first week there, i wrote some AJAX code implementing the auto-complete like google’s D

and implemented two algorithms i had just learned while ACMing in JAVA (edit distance, soundex)

the good thing there that i was holding a whole project by my own, in C#

i felt how was it to take care for some features that may not be of any importance for me, but is irritating that it doesn’t exist for the users

like “Esc” button to close the form, I NEVER USED “Esc” TO CLOSE A FORM !!!

and some other functions key plus the “Tab” navigation

and for the first time i needed the “decimal” data type to have accurate decimal point calculations.

the thing that i didn’t like there that my learning curve tended to stop rising.

after two weeks i was doing the same thing and applying what i know to develop in the project.

and at this time, i was more interested in knowledge rather than experience.

so i was thinking to go back home to Alex to study or start my ACM training, but ZIZO got me internship in Mentor Graphics with a whole new paradigm, Thanx ZOZZ ! )

ah, i forgot to say,

the greatest CON in that company that it was in Cairo,

and the best PRO that it’s manager is originally from Alexandria )

Tagged: acm, AJAX, Alexandria, C++, Cairo, Decimal, Internship, JAVA, javascript, ShuraTech





well..

that took me some time to create the launcher D

first i’m running on Ubuntu 9.04, all what i wanted is a launcher to start the Arena without the need to digg into folders for it

so i made the icon, put it in the Application launcher and added the command wich was “javaws %ArenaPath%/ContestAppletProd.jnlp”

and when i click it, nothing happens

and when running that command in a terminal it outputs:

Jun 23, 2009 5:26:20 PM com.sun.corba.se.impl.ior.IORImpl getProfile
WARNING: "IOP00511201: (INV_OBJREF) IOR must have at least one IIOP profile"
org.omg.CORBA.INV_OBJREF:   vmcid: SUN  minor code: 1201  completed: No
 at com.sun.corba.se.impl.logging.IORSystemException.iorMustHaveIiopProfile(IORSystemException.java:473)
 at com.sun.corba.se.impl.logging.IORSystemException.iorMustHaveIiopProfile(IORSystemException.java:495)
 at com.sun.corba.se.impl.ior.IORImpl.getProfile(IORImpl.java:334)
 at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_Object(CDRInputStream_1_0.java:787)
 at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_Object(CDRInputStream_1_0.java:761)
 at com.sun.corba.se.impl.encoding.CDRInputStream.read_Object(CDRInputStream.java:231)
 at com.sun.corba.se.impl.resolver.INSURLOperationImpl.getIORFromString(INSURLOperationImpl.java:120)
 at com.sun.corba.se.impl.resolver.INSURLOperationImpl.operate(INSURLOperationImpl.java:130)
 at com.sun.corba.se.impl.orb.ORBImpl.string_to_object(ORBImpl.java:836)
 at org.GNOME.Accessibility.AccessUtil.getRegistryObject(AccessUtil.java:143)
 at org.GNOME.Accessibility.JavaBridge.registerApplication(JavaBridge.java:1099)
 at org.GNOME.Accessibility.JavaBridge.<init>(JavaBridge.java:364)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
 at java.lang.Class.newInstance0(Class.java:372)
 at java.lang.Class.newInstance(Class.java:325)
 at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:786)
 at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:875)
 at javax.swing.ImageIcon.<init>(ImageIcon.java:136)
 at javax.swing.ImageIcon.<init>(ImageIcon.java:155)
 at net.sourceforge.jnlp.runtime.JNLPRuntime.loadWindowIcon(JNLPRuntime.java:469)
 at net.sourceforge.jnlp.runtime.JNLPRuntime.getDefaultBaseDir(JNLPRuntime.java:259)
 at net.sourceforge.jnlp.runtime.Boot.getBaseDir(Boot.java:405)
 at net.sourceforge.jnlp.runtime.Boot.run(Boot.java:169)
 at java.security.AccessController.doPrivileged(Native Method)
 at net.sourceforge.jnlp.runtime.Boot.main(Boot.java:160)
netx: Invalid XML document syntax.

after some searching i found that this was because of the version of JAVA i use, the default 1.6 but “OpenJDK”

so when i used the command

“/usr/lib/jvm/java-6-sun/bin/javaws   %ArenaPath%/ContestAppletProd.jnlp”

it ran correctly

and i added the “-Xnosplash” to the command before the Arena path to disable the JAVA web start splash screen D

i hope that helps some body like me )

Tagged: Arena, error, JAVA, jnlp, OpenJDK, TopCoder, Ubuntu





continuing with the second and last part in Scientific Computing Posts

where the first part was Scientific Computing Dept. [Part 1]

it’s just about the courses taken in SC

well…

this semester was less interrsting than the first term, may be that was becaouse we had less scintific materials than the first as fourth year studs are planned to finish the exams half a month earlier tha usual so the materials taught are less than usual in all the deps

but that doesn’t mean that we hadn’t took nice subjects

The First was Environmental & Global Computations:

lol, that was the subject that i was very keen of knowing what will we take in it since i was in the third year, it’s name is very unusual D

we took some numerical methods for solving differential equations ,representing some phenomena “Temprature, wind…”

at the end of the course i was able to produce a data file that represent the flow of wind in a room, then i used the visualization package i’d developed in the first term to see it visualized and here it is

the best thing that in this subject i understood alot of things from the Finite Elements subject i’ve took in the first term

i won’t talk about it’s doctor as he is the same who gave us Visualization in the first term (Y)

The Second Computational Geometry:

this subject is one of the subjects that made me choose this department, and i think all who’ve choosen SC thought the same about this subject,

as i heard from Dr.Mohamad Samy that he wanted to join SC mainly for this subject, and he is very right

the only problem with this subject that the Doctor was brand new to teaching in egypt , may be that was the first term he teaches a subject as it’s Doctor not a TA

anyway

we had taken 4 or 5 algorithms about computing some geometry problems, implementing some algorithms to solve them in optimal way

here is one of the assignments “Simple Polygon Construction

and here is a screenshot for another one

The Third is Distirbuted Computing:

i didn’t enjoy this subject as it was kind of repeated for me, it’s typically the HPC from the first semester but more basic as we took it with CS department, and they didn’t know any thing about Distributed Computing and MPI programming, the only thing i liked that i coded with MPI and i like doing so

about the Doctor he is the one who gave us the Mathimatical Programming in the first semester

The Fourth Theory of Computation:

i really don’t know if it is useful or not, its something like explaining how the lighter was made by explaining how can u produce fire by banging two rock together or rubbing sticks

but anyway it was a sort of science.

ah.. and in it i understood the true difference between P, NP & NP-Complete problems at last D

about the Doctor, i think he is very good in this field, he seems to be weird while talking, but what do u think a computer scientist be, espicially in a science like Computer Thoery D

and the Last one The Selected topic:

if u don’t want to get bothered by this crap scroll down to the next horizontal line

this is a typical peice of crap, it’s just a way to waste time, i don’t know what else should i describe this subject.. sry this THING

it is not for specific department, its a kind of deal between the collage and ITI they come and show us a collection of tracks and each student chooses one, i’ve choosen to be in the IBM Track, it offered in its orientation session some useful concepts, but i doubt it gave it

and i think all my friends in the other tracks thought it is useful, except the Microsoft Enterprise track, they had took the latest Microsoft technologies and ,it was the best this year from my point of view

i realized later that the main aim of this track is to teach us JAVA :s

i was very disappointed, not for taking JAVA, but for wasting time following such a course while i can get a book and learn more that 4 times that man had give us in the whole course in a couple of weeks

about that guy who gave us that course, form my point of view he is very unqualified to teach in a place like FCIS

how can i judge him so ?, here is the first and last situation i’ve argued with him..

he said i’ll ask you a bonus question.., what is the difference in the output between those two code lines

for(int i=0;i<10;i++)
{
System.Out.Println(i);
}

and

for (int i=0;<10;++i)
{
System.Out.Println(i);
}

what is the difference ?

the right answer is that they’ll produce the same output

he said NO, as in the second piece of code the i will be incremented before the loop is entered

WHAT !!!!!

ok, ok may be i didn’t try it in JAVA before, so i asked a friend to open a machine and try it, the machine had Netbeans installed, so he tested it on it, they both produced the same output

till now i didn’t judge that person for anything, every body makes mistakes

so we called him and showed him the output,

he stared a little, deleted the code and re-wrote it, ran it once and twice, then said “ok, ok, NetBeans has a bug, try it on rationl”

(where rational is the IDE we used which is “eclipse”)

WHAT THE #%^*^& !!!!!!!

this situation has two explanations

1-he knew that he was wrong and tried to deviate us and he lied, then he sucks

2-he was really thinking that this is the reason, so he don’t know that at the end of the day both IDEs use the same JDK/JVM

then how come that he teaches JAVA !!!!!!

so since that incident i didn’t listen to a word he said, anyway i just was attending the first 15 minuits taking the attendence, then going out making some acmASCIS stuff D

—————————-

anyway

i think that some other courses should have been added instead of those courses

courses that gives new Technologies, things that we don’t take in the regular FCIS courses

as Microsoft/Non-Microsoft New Technologies , Parallel Programming, Multi core programming or even Game programming

ok, those topics might not be needed in the egyptian market, but the one who can code a game can easily learn how connect to a database P

ok, don’t remove those, but leave a space for some science

sry, i botherd u with that subject, but thats only less than what i feel towards it D

anyway..

the best thing i liked that there were no constraints on the programming language we use,

in the environmental once there was an assignment which was implemented by 5 differrent languages, C++/Python/Matlab/Octave/Mathimatica

God bless our TA he checked all those D

that was SC this year, i heared that there will be some remarkable changes to the better next year

i’m really gonna miss SC and the SC Mens (

but that is life…..

Tagged: Computational Geometry, crap, Distributrd Computing, Environmental & Global Computations, FCIS, High performance Computing, JAVA, SC, SC Mens, Scientific Computing, Selected Topic





i’ve participated in many contests as organizer, specifically in the technical stuff which is mainly to portions

  • The IDE which is mainly “eclipse
  • The contest communication tool which can’t be except “pc2″

and in the last contest i’ve participated in it’s technical preparations i faced a number of troubles

lets take them one by one

1.Teams don’t connect to the Server which is a Linux Machine

  • Solution : before you open the server edit the “pc2server” file and edit this line
  • java -Djava.security.policy=policy.ini $PC2CN $*
  • to be
  • java -Djava.rmi.server.hostname=”10.106.0.35″ -Djava.security.policy=policy.ini $PC2CN $*
  • of course change the ip according to your server ip

and make this edit in all the executables you will run {team, board, judge…..}

2.when adding the C++ language sometimes judges fail to compile or launch the “exe” file even with the pc2 server on windows

  • actually i dont know why does it does so i just edit the configurations of the language  adding .exe after each {:basename} and remove “-lm” and it works   “weird”‘

3.Sometimes when you close the server and open it after adding the problem’s Data it refuses to open throwing an exception about the JAVA heap

  • Solution : in the “pc2server” file edit the line “java -Djava.security.policy=policy.ini $PC2CN $*” to be
  • “java -Xns64M -Xnx512M -Djava.security.policy=policy.ini $PC2CN $*”
  • this just increases the size of memory given to the server to 512 MB Max.

thats about pc2 for now

4.when running the eclipse project for the first time it may get you an error “launch failed no binaries”

  • save all the files in your project & from the menu “Project->Build All” and then run the app
  • or get used to “Ctrl+s” then “Ctrl+b” then run

5.when running the eclipse project it add to the problems “…….Access denied”

  • one of the reasons is that previous versions of the program is running, just make sure u close’em all
  • switch to the “Debug” perspective and select the program then terminate it

thats what in my head right now

oh, yes

one more thing

6.after you prepare all that and the electricity goes down for half an hour two times

  • Solution : Actually no solution is found till now
  • just get away from people to not kill someone D
Reblog this post [with Zemanta]
   Tagged: acm, ACM Contest, acm-icpc, contest, Eclipse, electricity, EXE, heap space, Integrated development environment, JAVA, Languages, Linux, OutOfMemoryError, pc2, pc2server, preparations, Problems, Programming, Server, Ubuntu, Windows   




SUN SPOT
icon1 jaqoup | icon2 Experience, JAVA, Open Source, SUN, SUN SPOT, flying bike | icon4 12 9th, 2008|


just this video will make you feal ” :O “

   Tagged: flying bike, JAVA, Open source, SUN, SUN SPOT   





As my two friend Alaa & Foaud are writing [Problem of the week] 

i am also writing Problem NOT of the week :D

bcoz i wont write a problem weekly in addition to i dont know the solution of my problems :) almost…

.

.

during my internship time i spent in Mentor Graphics Cairo i needed to implement a function

and when i started coding i found that it was impossible to do it that way

may be there is a way that function can be implemented but i dont know how due to my small experience with JAVA

Here is the problem definition:

Programming Language used : of course u know its JAVA what r u looking at :P

*

Problem context:

-I have an object of type Design

-I have an object of type Diagram

-The Design contains one or more Diagrams

*

Problem:

-I have an Iterator<Design>

-form that iterator i need the next Design and an Iterator<Diagram> and a Diagram

-The function should return boolean value weather it succeeded or not

*

My First implementation was:

boolean getNext ( Iterator<Design> designs , Design currentDesign , Iterator<Diagram> Diagrams , Diagram currentDiagram )

{

      if (! designs.HasNext() )

           return false;

     currentDesign = designs.next();

     Diagrams = currentDesign.getDiagramIterator();

     currentDiagram = Diagrams.next();

     …..

     return true;

//It compleeeetly didn’t work because JAVA has no passing by reference !!!

}

*

note: 

  i cant make the three variables ( currentDesign , Diagrams, currentDiagram ) global as they are created in the calling function

 

 

What did i do …..

Copy & Paste those line every where i needed that function :P