kernology - where laurie and learning meet
  • Home
  • Blog
  • Pictures
    • Art & Craft >
      • Temari
      • Yubinuki
      • Quilting
      • Weaving
      • Lapidary Work
      • Metal Work 2010
      • Metal Work 2009
      • Classes - 2010
      • Classes - 2009
    • Boots
    • Canyon Lake Gorge
    • Views of Texas
    • Views of Scotland
    • Travel >
      • Bunny Bravehart Road Trips
      • Scotland 2012
      • Maine 2011
      • New Mexico 2010
      • Scotland 2008
  • Oh, the places you will go!
  • Contact Laurie

Finally A Live Project

3/16/2014

 
Yes, at work one of my software projects has been released to production, it on the server and in use!

This project was one of two that I stared when I changed groups last June. The first part was a file transfer system because ftp and sftp were not possible to use. The second part was the user account management system.

I finished both in November and user testing happened between December and January. The account manager application is inside our firewall. The file transfer system has to sit in a DMZ and thus all manner of paperwork was required to be done to open ports.  Once that was signed off it was deployed and ta-da it is now in use.

I am still working on my second project which is parsing a gazillion bytes of data. I can now read the file, parse it, map it and export the mapped data to a CSV. The next phase is translating it from the original format to another format that can be read by the third application. With luck the prototype will be done by May and then we can start writing the front end. 

Byte Me!

12/15/2013

 
I have been on a new project at work for about 3 months.
I am writing an application to read a data file and then transform it to another format but before we accomplish that, I have to learn the data format and what it all means.

For the past month and a half, I have been reading the specification and writing a program that will read the data, grab the header information, and put the result into an XML file.  That part is now done.

All the data to be read in from the original file is in binary format and that is what I have been dealing with. I have not worked with binary data in over 35 years. I know how it is worked with but everything I learned back in college is still valid in theory but the actual tools to use have changed and that is what I am working to learn.

Let's review shall we - 
Binary format is data that is either 0 or 1. This is also known as a base 2 numbering system.
[FYI, the numbering system we use in our every day life is base 10]
A BYTE is composed of 8 bits
00000001 = 1
00000010 = 2
00000011 = 3
etc.
There is such as thing as a nibble which is 4 Bits
And there are 2 nibbles in a Byte

A "word" is n number of bytes, but n depends on the type of computer system you are working on.
So way back when we got our first PC's that were 16-bit, that implied there were 2 Bytes in a word; in a 32 bit system, there were 4 Bytes in a word; and of course now that most of us are on 64 bit systems, we have 8 bytes in a word.

And when dealing with binary data; YES, you can Byte off more than you can chew (in a nibble) - ha ha.

Well my data file is made up of packets of 2 Byte words so before I can even start to read the data, I have to first swap the byte positions such that the byte in position 0 goes to position 1 and  what was in position 1 goes to position zero this is because the system writing the data is slightly different than the system that reads it on the computer I use.

After that I have to look for 3 Bytes (to be known from now on as the magical series). 
The values which are: 0xFA, 0F3, and 0x20. 
That is hexidecimal, which is base 16 which is counted as 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A (in lieu of 10), B, C, D, E, and F (15 in decimal). So in normal speak I am looking for 250, 243, and 32 decimal values.

BUT get this, I can't just search for them across all the bytes; that would be way to easy. It turns out that the system that writes this data uses an odd system of bytes that are 8-9-9-8-9-9-8 bits but with a 8 bit writing to the file. SO this magical series of data that I have to look for is split across normal 8 bit Bytes but is contained in the weird series. 

How does one find those values.... well that is what bit masking for and that alone is a whole blog post on it's own. Lets just say, it is like subtraction to find how many 2 you can actually see in the number 12 or 2,523 and what positions they are in. Bit Masking allows you to see if the 2 is in the first (12) or last position (2,523). 
 
This image shows how I determined what the bit mask should be.
Picture
Once I find a magical series, I have to break up that section of the packet of data into 2,000 byte lists and then find the next magical series. 

But wait, there is one more twist. Occasionally the system that writes the data can toss out an extra bit or 2, or 3, and if this happens, all the rest of the bits are shoved off their position, I have to shift all the data x number of times (0-7 for a total of 8) and search for the magical series, again. Once the series is found, I can pull that data out and start searching again.
 
After 10 days of working on this bit of code (ha, ha a pun!) I have been able to process one channel (of 6) in one file.  It is a big accomplishment as I can now move on to the next part which is to read a clock and assign a running time value to each piece of data. 

Here are the numbers of what I was working in case you wanted to know:
  • 9,378 packets of data in the file.
  • With an average of 8,182 bytes per packet
  • Total: 76,730,796 bytes to be searched or 613,846,368 bits.  

A Woo-Hoo and Gloating

9/14/2013

 
I have been on a personal high for the past 2.5 days because I was able to loudly, at work, do a rather big
Woooooooo-Hoooooooo!!!
On Thursday afternoon I completed a major milestone for the project I am working on. 
I have been building a custom membership and role provider for our department and it had to meet all sorts of requirements: 
  • Minimum of 14 characters for the password
  • Minimum of 2 upper case letters
  • Minimum of 2 lower case letters
  • Minimum of 2 number
  • Minimum of 2 special characters (things like ~!@#$%^&*()....)
  • The password can't be reused in the past 10 times
  • The password will expire every 60 days
  • Failed login attempts 3 tries
  • Account get's locked after 90 of inactivity
  • Ability to log in with Username/Password or with Security Card.
  • User can reset their password from a profile page
  • User can sync/unsync certificate for Security Card
  • User can view and modify their profile


First I had to build the Database to hold Users, Applications, Roles for application, Users rights to Applications and assigned roles in the application.  After that it was building the libraries to handle all the interaction between the backend database and the front end which was getting the basic login with UserName/Password to work and after that the basic rules about the password. Then it was on to the User Profile page and the Edit Profile pages adding the change password when a user logs in and from the profile page.  The last big task was the security certificate and I gave myself 2 weeks to do this. Initially I had some issue with setting up certs on the web server (1.5 days of work) but once that was done, it really only took me 4 days to do the rest of the coding.   
And all of this was done with C# using MVC (Model-View-Controller), EF (Entity Framework), Ajax, and JQuery which are new to me. 

And on Thursday afternoon at 3:00 pm I was done with the coding. I still had a complete test cycle to go through to find any new bugs that I had introduced.. but that could be done Friday and next week.   

Coincidentally the guys and I had planned on going out to a new micro-brew that had opened near work and so I was now looking forward to a relaxing evening and we even went out for dinner. 

This is what has been consuming my brain for the past month. I would go to bed with code swirling around in my head; I woke up early (sometimes at 4 am) and would be in at work by 7am; I would work through lunch and not leave until 6pm. I would have code in my head during the 45+min drive home and then I would email myself the things I had thought of on the drive home hoping that since I had sent myself a note my head would clear. 

Friday morning I woke with a sense of calm I had not had for quite a while. It was a great feeling of satisfaction that I had done this all by myself. 

Next week I can start the management application for:
  • Adding applications
  • Add roles for the applications 
  • Granting access based upon user requests for access to applications
  • Assign roles to users for each application
  • Reset Accounts (user, roles, applications)

Some knitting and vegging

9/8/2013

 
I was very very tired yesterday. It was a long stressed filled week. 
I am still deep in my project at work and I had a big lack of confidence event mid-week. The current task, out of many before the project is done, is something new for me and I realized on Wednesday that I might be going down the wrong path and I realized this at 5:45pm. I came home and proceeded to spend the next 4 hours Googling for articles on the subject cause a bit of OCD had set in. It was that or stay at work  - very very late. I did find a few articles and even a reasonable tutorial that would, when I read it all, explain to me, where I took a wrong turn. This of course caused me to not get a good nights sleep and to wake up even earlier than normal. I spent almost 9-10 hours on both Thursday and Friday redoing my code. Thankfully it all worked and I certainly understand the subject better. 

All of this resulted in me being very tired yesterday. I stayed home and decided to work in a new knitted scarf.  Last year at Convergence I treated my self to a hand picked color wheel of yarns from RedFish Dye Works. The color wheel I chose was of muted colors (12 colors) of Silk 20/2 weight which is lace weight and I am/was planning to do a nice color gamp shawl/scarf. But since my loom at home currently has cotton waffle weave towels on it AND each skein is 450 yards.. I figured I could do a knitted scarf and still have plenty left over to weave with later. 

I then went looking through my library of knitting books for a nice, lacy scarf that was not a very complicated pattern. I will be watching TV while knitting so I need to balance attention to the pattern to actually watching the tube (though TV's are not tubes any more).  I did not find any thing I liked in a pattern book so I then turned to my knitting dictionary. I found a diagonal fishnet pattern that would light an airy. I had to do some experimenting to get the right weight and needles and how many rows to knit to get a "variegated" look.  As of today I am almost half way done. 

Here is a picture of the scarf in process and I am part way through the 5th of 12 colors. 

Picture

September Start

9/2/2013

 
As we start September much has happened.

We closed on the second house (in Texas) and now to rent it out. We snagged an extra empty lot next to the new house and that will close in the next week or two. Does this make me a land baron or baroness?

No, I have not done much weaving, again BUT I am ready to start a new design on my rep weave placemats as the first 4 are done. 

I have also really thrown myself into my new projects and work and have found that it is suddenly 6 pm and past the time to go home. Then when I get home, I still have code whirling around in my head which at times does not stop even when I go to bed; and it is there still when I wake up and then the cycle repeats.  To resolve this I have finally installed a development environment on my computer at home. 

Wait - how come she has not done that already being a software engineer?? The reason is that I use a MAC at home and at work we use PC's with Visual Studio, SQLServer and lot's of other PC software that won't run on a Macintosh. 

BUT not any more.

A while ago I found out about Mono Develop a IDE (Integrated Development Environment) for Mac's, Linux, and PC's that will allow you to write C# code for Mac's, Linux's PC's, and Smart Phones (iOS, Android, etc). I played with it when I was experimenting with Android development. Then I set it aside. Recently Xamarin  released a new version and I thought, let's give it a try so I could do some development for myself, at home. 

Saturday morning I installed Mono plus GIT (source control) and SourceTree because I use BitBucket for source control. And Git works very nice with Mono/Xamarin.   I started this all around 7am and had a development environment up and running by 10 am. Then I proceeded to write some code (I was at it for almost 4 hours) and learn more about the design architecture and I am now using at work: Model-View-Controller. Along with that I am getting up to speed on jQuery and Entity Framework.    

Now I don't have code in my head and I can enjoy the rest of my weekend, what's left of it.  

Post Text Road Trip Overload

8/4/2013

 
Since returning from THE TEXAS ROAD TRIP I been very busy both at work and at home.

In the arena of software development technologies I have been a bit behind the curve in keeping up and that is partly due the projects I was on at work - the were so big and so complex that as technology moved forward the project did not adopt is because it would have taken too much money and too much time to go back and re-architect and re-write the whole thing. I am also to blame as I could have also been learning it on my own but with all the other hobbies I do something had to give and that was it.  Now that I am on a new project at work, I am getting back up to speed on the tech track. I am now learning MVC (Model-View-Controller) and before my trip I was able to spend a good solid month learning the basics and work on the new project at the same time.  This past week we had an on-site training class in MVC for developers on base who are now using it or WILL BE using it. Out of 15 students one has been into MVC for about 6 months, then there is me and my one month and two other developers who have just started; everyone else was a newbie.  After 4 days of MVC training my head felt like it would burst and I this week, will probably redo a good portion of my code so far; and I am guessing the other students were just overloaded.  

At home I have been beating on business accounting and inventory software. You can read about it over at The Adventurous Silversmith. Let's just say it has been a slog!

HOPEFULLY next week I will be back at weaving and Sunday it is Repousse and Repartee with Diane from the Palomar Gem & Mineral Club.

More weaving and other stuff

6/29/2013

 
Last weekend I really did make it down to the barn and was able to get some weaving done. I did not get as much weaving done as i would have liked though.  

Why?? It was the second weekend of the Spring Steam Engine and Tractor show so there were many, many visitors in the weaving barn and so I was answering a lot of questions; which I don't mind doing and in some ways I actually enjoy doing. But when you have your mind set on weaving at least TWO placemats and only one gets done over 6 hours there is a bit of personal disappointment. 
Overall I did have a good time sharing what I know and explaining what I was making which in the big scheme of things is all good. 

I am also into my second week of the new project at work and not only am a developing a new application I am learning a new (for me) architecture pattern called MVC (Model-View-Controller) using Microsoft .NET. Let me say that even thought I am liking it, it is a bit frustrating since it is a major shift away from what I have been doing for the past 10 years with "traditional" software development. 

And today I did not go to the barn, again even though I had planned to. I have picked up a website build/design job from a friend so I was off at his place taking pictures to use on the website. When it is all done, THEN I shall post links to it and you can see more of my work.   

Afterwards, I went to the Volunteers For Minerals booth at the San Diego County Fair, at Del Mar and volunteered 4 hours of time helping with sales and hanging out with some of my friends.

Picture

Slaying the Coding Beast

5/1/2013

 
Today I slew the 4 headed hydra beast known as a custom user control.
I call it a 4 headed beast because I had 4 major hurdles
1 - Code the UI. A custom user control is all code, there is NO WYSIWYG to set it all up.
2 - Code a templated control. The base control was a form view with a read only and edit mode with lots of text boxes and labels AND it had to be bound to a
3- Wire up all the events and make sure I could switch from edit to read only mode plus the actual updating of the data back to the database.
4- Test, Test, Test.

Slaying the Beast Known As...

1/3/2013

 
Over the past two weeks, at work, I have been beating on a problem.  I am glad to report that it has been solved but it was not fun. There were days that I did nothing but Google and change my code but nothing would work and because what I was working on can be done so many different ways, there was not a single Google result that directly addressed my situation. Which is why I am posting this now. I hope that this will help someone else.

If you write code in Visual Studio, .net and you write services - read on. If you have no idea what this means, I suggest you read now because if you continue you might get a headache.

The beast that I am referring to is WCF. [Windows Communications Foundation]

Writing a WCF Service can be daunting if you have never written a Web Service before and trust me it can be daunting even if you have written an old style Web Service but have never touched WCF.

But configuring the Service and the client that uses it can make a seasoned developer curl up in a ball, under their desk, and whimper if not make them out right CRY.

This post won't go into how to write a WCF Service.

This post won't go into how to write a Client to consume the Service either.

What it will do is detail the problems it has taken over a week to sort out on the configuration of the service host and the client when using basicHttpBinding (again, if you don't know what that is I suggest you run, run fast and run NOW!). Yes there are other binding options but this is the one I was dealing with.

Here is the set up.

I have a WCF service.  Right now it runs on a production machine using HTTP (that's an internet protocol for those of you who did not run away) We will be eventually using HTTPS with Certificates but for now, we want to use HTTPS with OUT cert's.

I need to test this on my local development machine. Yes, I have a cert installed in IIS. No, this post will not tell  you how to create a cert or how to install one - that is what Google is for.

For calling your service over ONLY http this what should be in your config files. First up is the web.config which is for the Service Host and after that is the app.config which is for the client.

Note: all  the other settings have been removed for brevity.
Picture
Picture
If you want to call your service over HTTPS with NO certificates, each file would look like the following. In the Web.confg you change the security mode to transport and then add the transport client credential type. Because we are not using certs, the type is NONE.  And don't forget to change the address URL to have the ‘s’ in the HTTP as shown in the next two screen shots.
Picture
Picture
But wait, there is one more thing that must be verified and that is the SSL settings in IIS. Your certs should be installed at this point but NOT turned on.
Picture
But what if you have different clients and one will call over https and one will call over http AT ANY TIME. It would be great if you could have the configuration files set up so you could call either protocol. 

The app.config can have two client enpoints and bindings and we will come back to that, but the web.config can only have one named service per actual service in the service host.  

I made the mistake of thinking that having two endpoints and two bindings would be the way to set up the configuration, so I set up my web.config to look like this…
Picture
Picture
Trust me, this does not work. The issue is with the web.config and how it is read by the system.

Adding a second endpoint and a second binding for the end point so one points at the http address and the other points at the https end point results in all sorts of errors such as:
  • Could not find a base address that matches scheme https for the endpoint with binding WebHttpBinding. Registered base address schemes are [http]
  • WCF endpoint could not be found for HTTPS
  • There was no endpoint listening at http://localhost /Service.svc that could accept the message.
  • There is no compatible TransportManager found for URI. This may because that you have used an absolute address which points outside of the virtual application

And the documentation is not that great on how accomplish this scenario. But this last error gave us a hint and that is the word  “VIRTUAL”

Here is what the two configuration files should look like and afterwards I will explain why.
Picture
Picture
Why does this work? Originally we configured the address of our service explicitly in the address attribute of our service's endpoints. That works when calling only http or only https. When you want both, there is a conflict because the service really does not know what end point to serve up to the client. I know, it seems like it should because we have explicitly specified the URL to use in the client; it is the service that is getting confused.   We have been using RELATIVE ADDRESSES.
If you look at the addresses specified in the client configurations, we have added what appears to be a subfolder to the addresses used in the client endpoints. These are not subfolders of the service. They are the NAMES of the service ENDPOINTS. And in the host node, we have two base addresses one for http and one for https.  THIS USES VIRTUAL ADDRESSES!   Because the client specifies which end point of the service to use, the Service uses what is called *Discovery mode* and it works out based upon the behaviors and bindings what security mode to use and thus it the url to use.

No, I will know go into the mechanics of what is really going on under the hood – even my eyes will roll into the back of my head if I did that.

I just hope that this will help someone else and save them the 3 days it took me to figure it out.

And a big thank you goes out to El Jeffie who also worked on this and found the final solution.

What do you get...

5/24/2012

 
...when you take 4 geeks and add two beers each?

You get a design session for mobile apps and people talking very loud and very fast.

So Eric, Jeff and I decide to go for a quick beer after work, along the way Jeff invites Will to join us but Chris could not make it. We met at our favorite pub (off site office)

During the course of complaining about work, which one must always do during the first beer, I mentioned that on my 5 hour drive home from Arizona (with Bunny Bravehart)  I had an idea for a mobile app - a game to be specific; and of course when I looked it up, sure enough there is an android and apple app for it already. But I might add all of them were paid apps not FREE.

Well we started to talk about all; the features we would have and we decided, as a group, to write the app any way because it gets us all into the app development area.

That was yesterday evening.

Today we have a list of 13 features we want to add to the basic game; we have chosen Android as our first target platform (to be followed by iOS, Blackberry, Windows Mobile, Symbian and even Pilot/webOS); we have a prototype name; a development system chosen; and even a development group name.

We will probably not make any money along the way but have lots of fun doing it.

<<Previous
Forward>>

    RSS Feed

    About Laurie

    Laurie lives in central Texas with the memory of Erich, a.k.a. "the shop elf", who was her hubby of 35+ years and Cowboy Boots, the cat; her metals studio including 100+ hammers and 300+ chasing tools; her sewing studio which has a sewing machine, a closet filled with fabric, hundreds of skeins of embroidery floss and perle cotton, silk and other materials, and Mrs. King the dress dummy; one weaving loom, assorted knitting needles, tubs of yarn; assorted art supplies of pencils, colored pencils, water color pencils, water color paints, acrylic paints, markers, and pads of paper; lots of books; plus a plethora of geeky tech gadgets, computers, and more.

    Archives

    May 2025
    March 2025
    February 2025
    January 2025
    December 2024
    November 2024
    September 2024
    August 2024
    July 2024
    May 2024
    April 2024
    March 2024
    January 2024
    December 2023
    November 2023
    October 2023
    September 2023
    August 2023
    July 2023
    June 2023
    May 2023
    April 2023
    March 2023
    February 2023
    January 2023
    December 2022
    November 2022
    October 2022
    September 2022
    August 2022
    July 2022
    June 2022
    May 2022
    April 2022
    March 2022
    February 2022
    January 2022
    December 2021
    November 2021
    October 2021
    September 2021
    August 2021
    June 2021
    May 2021
    April 2021
    March 2021
    February 2021
    January 2021
    December 2020
    November 2020
    October 2020
    September 2020
    August 2020
    July 2020
    June 2020
    May 2020
    April 2020
    March 2020
    February 2020
    January 2020
    December 2019
    November 2019
    September 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    November 2018
    October 2018
    September 2018
    August 2018
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    November 2017
    October 2017
    September 2017
    August 2017
    June 2017
    May 2017
    April 2017
    March 2017
    February 2017
    October 2016
    September 2016
    August 2016
    June 2016
    May 2016
    April 2016
    February 2016
    January 2016
    November 2015
    October 2015
    September 2015
    August 2015
    July 2015
    June 2015
    May 2015
    April 2015
    March 2015
    February 2015
    January 2015
    December 2014
    October 2014
    September 2014
    August 2014
    July 2014
    June 2014
    May 2014
    April 2014
    March 2014
    February 2014
    January 2014
    December 2013
    November 2013
    October 2013
    September 2013
    August 2013
    July 2013
    June 2013
    May 2013
    April 2013
    March 2013
    February 2013
    January 2013
    December 2012
    November 2012
    October 2012
    September 2012
    August 2012
    July 2012
    June 2012
    May 2012
    April 2012
    March 2012
    February 2012
    January 2012
    December 2011
    November 2011
    October 2011
    September 2011
    August 2011
    July 2011
    June 2011
    May 2011
    April 2011
    March 2011
    January 2011
    December 2010
    November 2010
    August 2010
    July 2010
    June 2010
    May 2010
    April 2010
    March 2010
    February 2010
    January 2010
    December 2009
    August 2009

    Categories

    All
    42
    Android
    Bfa
    Boots
    Bunny Bravehart
    Codesmith
    Comic-Con
    Covid
    Day Job
    Family
    Fencing
    Fiber
    Gorge
    Health
    Hike
    Jewelry
    Knitting
    Laurie
    Metals
    Minecraft
    Pandemic
    Photography
    Quilting
    Retirement
    Road Trip
    Scotland
    Sources
    Spinning
    Temari
    Texas
    The Big Walk
    Weaving
    Web
    Yubinuki

Kernology, Kernology.com, Laurie Jane Kern © 1998 - 2020 | All Rights Reserved