Older blog entries for nymia (starting at number 1900)

Flex + Webservices

In this article, we will look into the following:

  1. How do I write code for handling data from a webservice.
  2. What attributes would I need to be familiar about to setup the connections.

Now that we know what to do, let’s get moving to the next. Before that, we need to know what things are needed to be ready in order to proceed. First, we need to have an already fully coded Webservice running on a website. In this example, we are using Localhost domain, or simply the development machine as the Webservice source. And the filename of that Webservice is called student.asmx.

For this article, we will not be covering the details of student.asmx, as it is another set of technology requiring another article, so we’ll just leave that for now, treat it like a blackbox and only send and receive data from it.

The Login User Interface

Let’s write a login panel for our students. To be validated as a student, a user has to present credential to the login webservice by simply entering the Login Name and Password. The UI panel collects them and sends them over the wire to the webservice. The Webservice receives the credential and checks to see if it is a valid credential. Once validated, it returns the student record to the client login panel.

In the figure above, a graphical representation of the login panel have two input boxes for entering login ID and password, followed by the login button. The user enters data to the input boxes and later presses the login button to send the data to the server.

At the source code level, the xml declaration counterpart is shown below. You’ll see in full detail the attributes of the elements like the panel, input boxes, buttons and labels. Notice the login button has an attribute named click with a value of saveData() which is a symbol for a function name for handling the click event.

The click event handler for the button is shown below, saveData() calls the send() method found in studentWS, a webservice that does all the work of sending the data to the webservice and receiving the data back from the webservice. In this case, studentWS is the webservice, while studentLogin is the function declared inside the webservice, send is a method foe initiating the event.

At this point, you have a pretty good idea of setting up a graphical panel and the corresponding xml declaration. You also now know how to setup the send() event and where to attach it, the click attribute of the button.

The Webservice Tag

Syndicated 2007-11-05 07:45:23 from Freedom Culture

Accounting-ness

I was so surprised to hear my name getting called when the prof handed out the test results. The five students who were called stood up to get their prizes, and later were praised again to get special treats, a choice of one Hershey or sweet candy. Anyway, I was not expecting that to happen, I was merely trying my best to keep my grade at a respectable level, but I never thought it would go up this high.

And what was way even cooler was the fact that most of my solutions, rather financial statements are stored in Google spreadsheet. I have access to it anywhere there is a network.

On another note, I’ve finally decided the UI will be developed using Flex Builder 2.0, which is were I’m at at the moment. I did manage to figure out how to code an event handler for send()’ing and receive()’ing webservice calls, though. The hard part was figuring out how to cast the result object to an Array object, that is still probably one thing the Adobe engineers could work on, though. Make it more simpler to handle result objects.

Database-wise, the schema is already setup, the instance running on Dev, what is basically missing is finishing the webservice code for testing access times for setting up the index. Initially, the free accounting package will launch to target small service business, employing about 5 to 50 employees with gross revenue within the range of $100 to $1,000,000. That means a positive net income on your Income Statement. Well, it’s much better if the business is still in the red, though. They will probably need a free tool like this one to play around with.

Argumentations

While having a light snack, I had a small debate with my old man who is paying a visit. Here are my arguments:

  1. FACT: The term education came from the latin word educare, to guide.

  2. FACT: One who is considered a professor in class is an educator, a guide.

  3. FACT: Basically the prof’s purpose is to guide the students to the right path.

  4. When students don’t get high grades, it shows they are not being guided properly.

  5. Whereas, poor performance in test scores mean the professor failed to guide his students study the concepts correctly.

  6. Conversely, high performance in test scores mean the professor is doing the job guiding students to the right path.

  7. Therefore, the professor is liable for the students low test scores.

  8. So, If you get a low grade, it is the teacher’s fault.

 

Syndicated 2007-11-04 00:33:06 from Freedom Culture

The Right To Compete In A Mature Market

It looks like I may have chosen the wrong product cycle stage in the example I wrote in the discussion. What is finally coming down to is definitely this one: that the market is already mature and the marketing strategy being employed by my example company is based on price, more specifically getting efficiency up while competing in price–yes, a price war.

What initially I had in mind was a product ramping up growth, in which growth is increasing alongside profits.  Yes, the company I described may have changed plans several times, but the market it is competing in is still the same market, having the same set of competitors.

Marked by declining profits, the company will play the race-to-the-bottom game in order to grab a slice of the pie, which translates to even more saturation. I have not heard any news from management how this will eventually drive the competition to the ground, and when that happens, I am sure the status quo will change into our favor.

This is the reality being played in the market. Product cycles define the behavior of competing businesses, an environment where there are less winners and significantly more losers.

The example I gave was taken from the real word, my own experience as a developer and close friend of the owners of company. I never thought I would use this one as an example for this class, though. It’s just that it sometimes makes me wonder how the ideas I get from the classroom have significantly widened by view about the realities of business.

Syndicated 2007-11-03 23:49:23 from Freedom Culture

Pro Bono On The Accounting Side…

Maintaining a site for keeping lecture notes and solutions to exercises and problems takes about eight to twelve hours a week. That’s because a lot of new pages need to be set up,  prepped for the first time. It could could go down to eight hours a week as things move forward.

In tandem with maintenance, I’ve also set up a database backend specifically for the exercises. What this basically means is I’ve partially created a database-backend app with a web front-end for automating some of the accounting procedures. It’s not up-and-running yet, but it will be ready in the coming week or two.

I’ll open this project to the public once it is ready. This one is going to be Pro-Bono (free) as this will greatly help me in my studies, going forward. So, if you want a free-ride on your accounting system, especially if you’re a mom-and-pop store, a team-operating-on-a-dime, or even a smallbiz who wants to save that penny. My suggestion is to get on this project once it is ready.

I’ll take care of the nut-and-bolts, you basically plug-in the numbers and run reports. That’s basically the deal. It’s as easy as any accounting firm, except this one is free.

Send me an email, if you’re curious enough to know what’s going-on behind this weblog, though.

 OK, see you later.

Syndicated 2007-10-10 18:26:23 from Freedom Culture

Writing About A Domain Specific Topic Can Be Interesting.

Recently, a new webpage opened-up basically for posting lecture notes and solutions to exercises and problems. My initial expectation was to have an online repo for all things related to the subject, and it turned out to be wonderful thing. So, I kept on posting more notes and solutions, then one thing I noticed something about the page.

Stats showed most of the queries that landed into the page were mostly questions about finding a solution to a problem. That got my cells firing, though.

Anyway, I really don’t care about who is looking into these solutions or what kind of benefit will they be getting out from it. In my case, I’ll just populate the webpage with all the lecture notes and solutions for a specific book that we use in the class.

If it turns out the page to be a source of information for other students who are into the the same path as mine, well, welcome aboard and give a squawk.

quo vadis?

Syndicated 2007-10-05 18:42:44 from Freedom Culture

Book: Math/Physics For Game Developers

I bought this book several months back thinking it will fill-in big gaps needed to complete my understanding about the subject. At last, after painstakingly going over pages and working-through the combinations, I can finally say this book did the job in bringing me nearer to enlightenement, though.

So, what is this book I’m writing about. Well, let me tell you more about this book more before I give it off to you right away.  You have to stay in that chair a little longer. So stay!

Chapter One was basically intro with a clear start on points and lines. Typical high school material was covered in this section. Stuff like point-slope and slope-intercept were discussed to the bone here. You will surely end up feeling like a slope genius when you finally reach the last sentence, though.

Well, let’s see there’s about 14 chapters in the book and if I write 14 paragraphs describing each, that will probably blow-up my entry. I guess I really need to just write about my favorite part, the one that really brought it home.

Ok, the most interesting topic went to…drumroll…matrix operations! Followed by newtonian mechanics including energy and rotational equations.

So here it is: Click this line to see The Book

Syndicated 2007-10-04 06:33:12 from Freedom Culture

Cursors Can Be Deadly

When planning on writing SQL code, especially stored procedure code, you really need to think twice about employing the use of cursors. Here’s why:

  1. A single cursor will do just fine, provided you don’t mix it up with joined tables/views.
  2. A nested cursor will surely bring your server down to its knees. Mix it up with temptables and it will even slow down to a crawl.

At first, when you get it coded and tested, make sure that code runs against 10 gigabyte logfile. You will surely reward yourself for doing this test first before the code goes to prod, though.

In my case, the DB broke the 1Gigabyte barrier very early, by about 2 to 3 weeks after rollout. At that rate, we’ll be maintaining a huge DB soon, perhaps it will morph into a VLDB within 2 years.

Google Docs

I’ve never heard or read about Google Docs, what it does or what advantage it has over the competition, until I got into this odd situation.

I was firing-through the given assignments and noticed something not right with the way I was using technology in setting-up a repo for my assignments. it turns out Google has these nifty small tools for creating and publishing docs online. So I fired-up the browser and started using the following:

  • Presentation - Most of the lecture notes were converted into this format. I was able to convert all my notes in one sitting. it’s all online now, presentation format. Man, I’m telling you, this is cool.
  • Spreadsheet - This tool is a time saver, I simply entered all the numbers. Did all the standard steps in setting up the financial statements like Income Statement, Statement of Owner’s Equity and the Balance Sheet. Google Spreadsheet handled it very nicely. The cool thing about it is–its now available online.

Syndicated 2007-10-04 05:38:22 from Freedom Culture

Crunch Time

Whoa.

We passed the crunch and somehow glad to know I’m still in one piece. The experience we went through was highly intense, enough to sink the entire ship. But, at the end of the day, we finally broke through the thick fog to finish and deliver the code–ON TIME! 

I really would like to write the details, the intense emotions of my teammates. That experience probably showed a lot of how we worked as a team. But I’m not really good at describing intense emotional moments, the thought of not getting it right in time for QA and demo.

One quality or trait required to pull this through is this thing called optimism, you have to have a lot of it, no matter how grave or impossible the situation is, you have to believe you will make it.

Man, I wish that was the last we will ever do.

I wish there is a way of not going through crunch time.

Maybe it’s part of the culture?

Wait until crunch time, then work like hell to finish the job.

What do I know, this practice has been going on since forever.  All I know is the code gets completed and delivered during crunch time.

Syndicated 2007-09-07 07:02:55 from Freedom Culture

18 Aug 2007 (updated 18 Aug 2007 at 19:10 UTC) »

Alpha Test: Server-Side Code

I got the design narrowed down to its basic form, with only the needed feature coded for this test. I chose to write the first one to sit on an el- cheapo GoDaddy Windows Server. Then someone mentioned I shouldn’t do it because it will flood the box with hundreds of requests (i.e. webservice calls). So I changed my mind and built a test Windows Server just for that. The effort alone took several days to complete. And now I got the server side code sitting nice and pretty.

The first round of testing will be writing a client. I’ll cut a FlashMX client first and see how fast the server can dish-out Zone States via SOAP. I got a sample code already with only minor code tweaks needed to implement SOAP server interface.

The second round is another test using IrrLicht library. There is a sample code for loading Quake level maps and one low-poly actor mesh.

I’ll work on the setting-up the Linux server code next week.

Syndicated 2007-08-18 18:44:00 from Freedom Culture

Decoding V at N

OK, I’ve got to write this down before I lose this one.

It would be nice to know how fast clients pull data from a server for refreshing local client data. So I need to setup a test environment for that, a client that simply pulls data using the simplest method which is xmlprc or System.Net.*.

The server basically holding states of each client, gets updated M times a second, bombarded by asynch clients.

To get the vector at client N, we use the network data to calculate V at N.

 Two variables will have to be monitored, both upstream and downstream.

The thing to watch out for are burst moments, like simultaneous logins of students/users during the start of a class session. Secondly, monitor lag when threshold is reached. The spike, just milliseconds wide, could send the server down locked-up in an infinite loop.

Syndicated 2007-08-14 23:23:12 from Freedom Culture

1891 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!