Friday, May 22, 2009

How To Build Mudroom Storage Bench ?

Nothing like a Friday afternoon


Nothing is better for a programmer that Friday afternoon, after a long week of tensions, pressures and codes here, codes there, requests from users, social Friday comes and it's time to leave and forget about work for a couple of days, leave for a few beers, see the bride, do some sports, watch TV, etc.


This week in particular has been very heavy for me because the manager of the module where he's off work because she is pregnant and left me in charge of payroll, haaaaaa I spent a lot of lines of code in FoxPro I'd never seen and translate the formulas for calculation of bonuses to SQL, and everything makes it seem that I will be in charge of doing this from now on, now I understand because I always saw her working at all and with a lot of pressure, of course I had a lot more responsible.

Finally, after two long weeks of battle first to learn these sentences FoxPro, understand what was done in SQL and modify or develop what was necessary to reconcile the figures for the payment of bonuses, to work 9 hrs a day at last, I finally managed to reconcile it, now to enjoy the weekend that the following will also be heavy, I will set no codes or examples of what has been done in recent weeks and I am very annoyed to still see the code, share code in subsequent publications or examples of calculating the payroll.

As a friend only thing better than a Friday afternoon is a Friday afternoon in half.

For now is all we see ....

Monday, May 11, 2009

Physical Therapy Aide Sample Cover Letter

How to send a table to a Stored Procedure

In recent days I ran into a problem when setting a screen that some processing of Payroll, and it is typical that the user does not give you the complete or complete cycle of the process, my screen working properly , I suddenly completely change the requirements:

JefaNomina .- "Sergio, requirements changed, now the increase is not for everyone as you apply it on the screen, you have to put filters for different fields. "
Sergio .-" Quee, is a big change, that is, my query works correctly calculated the amount of "ProcesoNomina" of all employers, but with the same percentage for all "
JefaNomina .-" Ok, now employees can be assigned different rates, not everyone is estimated, has some A fixed amount will increase by percentage and other "
Sergio .-" And now as I do that, I'll have to make a new query "



Problem Statement:

for several days Make a SQL query that performs the calculation of "ProcesoNomina" about 10.000 employees in an automated manner, with a percentage increase for all, now the screen has to validate them if and which are not calculated if the amount or percentage rate and if what the different values \u200b\u200bfor each group of employees.
By making this change practically I have to redo the query, it should be noted that it is a very complex query.

As
resolved without removing the first query:
Through SQL Server 2005 to do an Inner join between the result of the first consultation and the new filters to be stored in a temporary table, this not to perform a new search. Hence the big question "How to send a table to a Stored Procedure"
a stored procedure receives integer values, text, etc., But not a table.
The solution is to send a table in XML format to the stored Procedure, read in the Stored and copy it to a temporary table.

like sending a table to a Stored Procedure:
Step 1:
Regardless the programming language being used convert your table to XML format

Step 2: Receive XML document as a Sture Procedure
XML data type CREATE PROCEDURE [dbo]. [SP_RecibirTablaXML] (@ XmlDocument XML)

Step 3: Create a temporary table where the query stored XML document. CREATE TABLE # TTemporalTipoTrabajador
(Selected integer, integer Id_Tipo_Trabajador
,
Txt_Tipo_Trabajador varchar (30),
Porc_Incremento decimal (18.4),
Porc_Incremento_Despensa decimal (18.4),
Imp_Incremento_Despensa decimal (18.4), decimal Porc_Incremento_AyudaRenta
(18.4),
Imp_Incremento_AyudaRenta decimal (18,4))


Step 4: Create an internal representation of XML document received to allow for consultations through the OPENXML command DECLARE @ DocHandle


int EXEC @ DocHandle sp_xml_preparedocument OUTPUT, @ XmlDocument

Step 5: We perform OPENXML query through and tell you WHIT command through the fields we want to obtain, in addition to input the records to the temporary table.

INSERT INTO # TTemporalTipoTrabajador (Selected, Id_Tipo_Trabajador, Txt_Tipo_Trabajador, Porc_Incremento, Porc_Incremento_Despensa, Imp_Incremento_Despensa
, Porc_Incremento_AyudaRenta, Imp_Incremento_AyudaRenta)
SELECT *
FROM OPENXML (@ DocHandle, '/ NewDataSet / dtTipoTrabajador', 3)
WITH (Selected integer, integer Id_Tipo_Trabajador
,
Txt_Tipo_Trabajador varchar (30),
Porc_Incremento decimal (18.4),
Porc_Incremento_Despensa decimal (18.4) ,
Imp_Incremento_Despensa decimal (18.4),
Porc_Incremento_AyudaRenta decimal (18.4),
Imp_Incremento_AyudaRenta decimal (18,4))


Step 6: Make a select the temporary table to display information, eliminate temporary table to free up memory and finally eliminate the internal representation of the XML document through
sp_xml_removedocument
select * from # TTemporalTipoTrabajador DROP TABLE # TTemporalTipoTrabajador

sp_xml_removedocument EXEC @ DocHandle

Here Full Stored Procedure:




Hata then ... ..

Tuesday, May 5, 2009

Use Olive Oil On My Hair



My name is Sergio Talavera am desarrollador.NET, work for a company dedicated to software development. Study Computer Systems Engineering, I am originally from Uruapan Michoacan and I have 27 years of age, today's my birthday on May 5 and I decided to start this blog with information related to software development primarily (eg codes, special cases etc.), sometimes share experiences with you, curious cases in this magical world of software development.







My beginnings as a developer
Although the University had experience in developing software and some simple programs to develop small firms, the real world of software development is in large companies, you're faced with great obstacles, both technological and personal. During the month of July 2007 the company hired me to start developing software for them, and came to Tamaulipas to participate in the UAT system with a NOX good friend http://codificandolavida.blogspot.com/ twist of fate that Monterrey is also developing software.


When started in a work primarily outside the place where you grew up is a great challenge and great adventure, because you leave behind a life and start a new one, I remember when I came to start with great enthusiasm and Tamaulipas undertaking a 12 hour trip from Uruapan Michoacan to Cd Victoria Tamaulipas, look for a house to live, acoplarte to a new company and what is required in software development.

Bad Experiences
One of the bad experiences I remember was entering a module where the manager (Head-Mamon) fancied himself a master and thought to humiliate and make fun of people is responsible. Mala

Experience 1:
One day at 8:00 pm
Head-Mamon .- In a mocking tone "Sergio do this script for a database migration is for tomorrow ... ..."
Sergio .- "ok, but why not tell me earlier to make it" Head-
Mamon .- "This is the Business ... ... lol (laugh mockingly)"
in my mind Sergio .- "Cursed Chilango castor"
I unveil until 3:00 am to finish the damn script and the next day did not ask, happened a week and asked me, spent a month I discussed with him changed my module and I never asked. Mala

Experience 2:
Friday 8:00 pm
Head-Mamon .- "Sergio Tomorrow we hope to work on at 10:00 am"
Sergio .- "Well alright" in my mind ("Chin is canceled out with the guys")
Saturday 10:00 am, alone in the office
Later, other partners, and made 10 and the 11 the 12's 1 2 and 3, finally reaches the head-Mamon, all silent (reflect their fear). Head-
castor .- "Let's see how they go with their screens, Sergio help me to get information to this database to create a curriculum"
Sergio .- "ok"
I struggled to finish I leave early, as my Chief-Mamon chat and to enjoy the fear that made them feel to others, ends at 7:00 pm
Sergio .- "ready, I have to go" head-
Mamon. - "You can not leave until you check your screens completed, and is the last one I'll review .... Hahahaha while other plans to help me study "Screens
certainly done since Friday.
Sergio .- "But I and the end and go, if you want me back later aq also review arrives at 10:00 am and 3:00 pm you at work had given me earlier," Head-Mamon
.- "Well, on Monday spoke with the Max-Chief, because this is not right"
Sergio .- "Well speak"
After this problem I changed the module, after this boss "Mamon leave the office for poor performance.

Now a question:
Software development often involves working overtime, especially when you have to complete a product to enter into production and users are detained until it is finished your screen, but everywhere there are people who want to make less and humble to have a higher position than you, never be allowed to make you less or humiliated, a man can lose your job, money, etc. But never his dignity and trample you if you let it go to do forever. And when you have a good post never humiliate or make less people working for you, life takes many turns and sometimes you get to be up and you have to fight to always be so, but sometimes I happen to be down.

Good Experiences:
removing the bad experience of working in that module, has generally been good, in other modules have had good experiences with people who work together and support you in case you have difficulties, in general There is a good working environment and business in general is good.
To Finish:
The world of software development means that you spend considerable time and effort learn new technologies, research to develop products according to customer needs. From now share the experiences and difficulties in my work, codes, and interesting examples.
My friends do an invitation to publish examples of this blog.

Until Then ... ...