serishema.org - Maria Welborn

Web Design, Multimedia and Programming

Login
< Prev  November 2008  Next >
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456
Telecom OKTA Agent tips by serishema 10/27/2008

Telecom NZ has been pushing the OKTA Agent smartphone. This phone is actually a rebranded pantech tx-820. It's a fairly neat device. It does all the usual smartphone tricks like checks your email and browses the net. It's major failing is the inability to send picture messages (or PXTs, but PXT is actually a trademark of Vodafone). One thing you may not have found which can extend the battery life somewhat is the IPM mode option in settings. Change this from turbo to normal. This option is IMHO stupid. What setting it to turbo really does is disables the power management features of the intel PXA270 CPU used in the phone - while this does increase performance, given that the battery is only 950ma - a rather pathetic capacity really when you consider the power requirements of such a device.

 If you are wondering how to perform a hard reset on this phone this is done by holding the "OK" button while you turn on the phone.

just don't tweak it by serishema 10/9/2008

There are large numbers of "performance enhancing" tweaks on the internet for Windows Vista, which might be just what everyone needs. Unfortunately most of these actually make performance worse.

Microsoft are not anywhere near as stupid as you think they are, just about everything that looks silly on the surface has been carefully thought about. Right to start off with RAM is about $10 / Gb or even cheaper if you shop around. So you should have 2Gb or more before you even think about putting vista on a computer. Why furstruate yourself with a slow machine for the sake of saving twenty bucks?

Common Tweaks that make things worse:

  • Disabling Windows Search Service - This is supposed to prevent the search service stealing processor time from other applications, trouble is this service already runs with a very low background priority. When it's disabled the index is still updated though only when a search is actually performed, however it will continue to update the index after this first search takes place, now at normal process priority (8), instead of idle (4) priority like it does as the service. If you are having trouble with the windows search service taking up a lot of processor time the actual solution to this problem is to delete any shortcuts to webpages that have been created by non vista-compliant applications. These are easy to spot because if you open a folder containing one, search for it's name in the search bar and then single click (select) its icon, the shell crashes.
  • Disabling superfetch - This is supposed to improve performance by making more memory available more quickly, but in reality there is no penalty for a cache miss above the cache not being present. The windows memory manager is much more complicated than having simple free/allocated pages. Where an application requests memory used by superfetch this is O(1) meaning the amount of allocated ram vs the amount requested has no bearing on the time the allocation takes.

 

What i'm working on these days by serishema 10/6/2008

I've not blogged in a good while, there's been a lot of changes in my life. I've found out i've got a disability which has been affecting my ability to do useful stuff for much longer than I realized. I'm dating a new person and other stuff which i'm not going into here but if you google hard enough i'm sure you'll be able to find out.

I'm working on a lot of windows mobile related stuff at the moment. First project is an IRC client for windows mobile standard (formerly windows mobile for smartphone).
here are some disorganized screenshots as I don't really deal in vapourware. Most of my work is going into making the UI good for a small screen and phone keypad. I'm making the design assumption that you're using a phone that has a standard phone keyboard, not a QWERTY keypad like the motorola-Q or tmobile Dash. It will still work on  these devices and you'll get the benifit of eaiser input, i'm just focusing on making the input easy.

Server Chooser

Edit server details

Spy++ by serishema 9/8/2008

If you still write a lot of unmanaged, Win32 API code as I do the spy++ tool which comes with Visual Studio is really useful for finding cirtain types of UI bugs.
This morning I had an application which simply wouldn't create one of its tool palette windows, there were no error codes being returned from RegisterClassEx() or CreateWindowEx() so I thought what on earth is wrong!?

After using spy++ I was able to quickly see that the offending window lacked the WS_VISIBLE style. I re-examined the code and discovered that my call to ShowWindow was written as:

ShowWindow(hWndMemViewer,WM_SHOWWINDOW);

which is incorrect. I changed it to ShowWindow(hWndMemViewer,SHOW_OPENWINDOW); and all was well.

Windows VPS hosting gotchyas by serishema 9/5/2008

I miagrated this site and my other websites over to a Windows 2003 server VPS hosting solution and I was off the air for about 24 hours until I discovered this gotchya.
The setting for IP address in IIS must be set to "(All Unassigned)" in these environments because of the way Parelles Virtuosso does it's packet routing.

This is not what you would normally do on a physical machine, especially in a small business environment. You may have an intranet site or web application you don't want to expose to the outside world while your business website which you do, so you'll typically bind each site to the appropriate IP address in this scenario.

If you do not do this your web sites will get a HTTP 400 error (Bad Request) when they are navigated to by name, but will work fine if you type the IP Address into the browser.

tracking your kids by serishema 7/19/2008

There is now an expanding market for products and services which attempt to monitor ones children. From the well known internet logging/filtering software to services which use GPS to track the location of a child's cell phone and presumably the child themselves. All technologies are morally nutural even things that people who do not draw their conclusions based on logic insist are wrong like for example firearms, nuclear weapons or genetic engineering. However it takes wisdom to know how to use technology in a way that is benificial to the human race and with the introduction of a new technology it often takes more than a single life time to aquire this wisdom to apply that technology in a way that is benificial to humanity.

I've written before about the dangers inherrant in trying to use technology to solve what is essentially a social problem. If anything technology has a tendancy to cause social problems. For example the tendancy of telecommunications systems to decrease the amount of time that's actually spent face to face and physically meeting. In my university days I had friends who were taking different classes from me who I only saw a few times a year, this is apparently normal for the myspace generation. But I always felt the relationship lost something after I no longer greeted him each morning before class with two cups of coffee balanced on the closed lid of my laptop and we sad down and talked over coffee, aditionally not from behind a laptop screen.

Monitoring technology does have benificial applications, but I think in a culture where you can't talk to your parents something has been lost and it may well take 100 years before we find it again; if we ever find it again. One of the things that really helped me growing up is that I could tell my family things that I was not proud of, of the mistakes i'd made and this was OK, it was part of growing up and learning.

Finally if your child has some degree of technical savvy don't pay attention to what the makers of internet filtering/logging software say. If your child is 12 or older and is interested in computers beyond a machine for games, anything you can do they will be able to hack and if they are among the more inteligent, do so in such a way that you will never know they have unless they tell you. If they are interested in linux you won't have a hope in hell of restricting their computer use short of physically taking the computer away. Despite claims about monitoring software's undetectiability tools for detecting such software are readily available and distributed among school children. If your child has learned some degree of ethics with respect to technology, they will not remove this software despite having the technical ability to do so as they respect the fact that it is your workstation and not theirs, however they will still know it is there and they will likely trust you a lot less than they did prior to installing the software thus making the problem you installed such software to solve worse.

The same thing applies to GPS monitoring via cell phones, this can be defeated by any number of means and also does not consider the case of someone like myself who as a child did not own and had no interest in owning a cell phone. When I finally gave in to peer presure and got a cell phone; I did not take it to school. GPS tracking devices require the person you want to track to be actually carrying the device, seems obvious. There are also technical means by which some of these devices can be made to report a false location, however I will not discuss these as I don't want to unwittingly assist a rebelious teenager by providing a howto.

Finally these monitoring technologies do have cirtain cases where they are justified. Like for example at-risk youth who have been in trouble with the law previously might agree to be monitored as part of a youth-crime rehabilition programme.

In general, earn your kids trust and in turn you will be able to trust them. Technology as a substitute for trust does not work, it simply reenforces the adverserial mindset adolecenents can have towards their parents and this is bad for their welbeing and bad for your sanity.

remote disable for laptops by serishema 7/19/2008

Laptop theft is a corporate problem in IT these days. Hard drive encryption is virtually mandatory for most corporate laptops these days. If you are not doing this you should at least be using EFS to protect sensitive data. But this gives me an idea.

Internet connectivity is taken for granted these days. Using a computer which is not on a network and is never connected to the internet is virtually unheard of. Such a machine can be used as a typewriter and that's about it.

So what about a peice of software which checks in with a server every time the laptop is connected to the internet, where it is possible to tag a machine as stolen and on revocation of the machine certificate or some equally non-forgable protocol a special device driver overwrites the BIOS flash chip with zeros and then calls KeBugCheck, the windows NT kernel mode function that initiates the familar blue screen of death thus permanatly rendering the stolen computer useless. The boot code on windows CDs, specifically the part which prints the message "Press any key to boot from CD" for XP or "press any key to boot from CD/DVD" for Vista contains an exploitable vulerability which could be used to driver the flash overwrite if an attempt is made to reinstall windows to avoid the protection.

If this sort of technology became widespread it would virtually eliminate the market for stolen laptop computers, since they would fry themselves on subsequent connection to the net. If BIOS makers backed such a technology it could be implemented at the firmware level thus preventing a computer theif from installing linux and then formatting the hard drive to avoid the software.

Intel HD Audio on solaris by serishema 7/10/2008

Continuing my work on patching the 4 Front OSS HD Audio driver to allow the sound on tosbhia laptops to work on the solaris and Linux platforms i've found that the audio widget graph is indeed incorrect and a subvendor specific ID needs to be added to the table in codec_ids.h and a custom mixer init function written.

Doing this should not be too hard. I'm reading through the currently existing custom mixer init functions in the source code to learn how to go about writing one. SNV_91's insistance to not play nice with vmware (workstation 6) is presently hindering my productivity. If you've got this to work with a raw partition, not an image file, please leave a comment.

patching intel HD audio on solaris by serishema 7/8/2008

My current PC is the remains of a Toshiba Satellite L30 Laptop which is attached to a 17" CRT monitor, wireless USB keyboard mouse + other peripherals.

The sound card is a ATI SB450 which unlike the other AT IXP chipset sound cards is actually a realtek HD Audio ALC861 which implements the intel HD Audio spec.
Like many laptops, the BIOS is broken and the automatically detected widget graph is invalid.

I've been able to dump the  widget graph using the hd audio snoopy utility included with OSS for solaris. 

widgets.dmp (25.40 kb)

this is a plain text (UTF-8) file and is linked rather than pasted here as it's quite large.
The next step in this process is to read the intel HD Audio spec and look at the widget HD audio spec and figure out why the automatically detected graph is wrong and what it should be. While it's not the most elegant solution the hdaudio driver contains many vendor specific special cases so i'll likely be able to add one for my card too. If I succeed I have plans to port my changes to linux and submit them to ALSAProject.org as well.

An alternative approach to the data teir (part one) by serishema 6/25/2008

In ASP .NET web development there is a tendnacy to automatically use MS SQL Server (or another database server, such as oracle or mysql) without considering it's suitability to the requrements of the application or the data to be stored.

These days most web servers have 512Mb or more of RAM installed, the consequence of this is that for smaller applications, the entire dataset will fit in RAM. For web applications which do not require support for transactions such as blogs, forums and content management systems serving lower trafficked web sites there is an altertive to SQL Server for the data tier - XML files in the App_Data directory. In applications where eaither the data set or a substaintial subset of it will fit in memory, and the advanced features of an SQL Server based data teir are not required it's often possible to acheive better performance and shorter page serving times by using an XML based data tier in favour of a SQL Server based one.

The two most common reasons for slow loading times of ASP .NET applications are: 

  • using SQL Server as a data tier on a server that doesn't meet the minimum requirements for both SQL Server, the application and the operating system. The minimum memory requirement for SQL Server is 512Mb of ram for the express edition, I would advise 1Gb for the standard edition. To this you need to allow for the memory requirements of the servers' operating system itself, in the case of Windows Server 2003 this would be 256Mb, the memory requirements of IIS and ASP .NET and then finally the needs of the application itself. I would allow 128Mb for use by the C# or VB .NET compiler if there is a signficant amount of Code in the App_Code folder
  • Placing large amounts of code in the App_Code folder on a server with 512Mb of ram or less with a short recycle time on a lower trafficked website. This is especially a problem on shared servers that do not meet the specifications. In this situation it is better to upgrade the hardware, but if this is not possible, it is possible to reduce the performance hit of compilation by ensuring as much code as possible is pre-compiled and placed in the Bin folder of the application.

This problem arises for largely two reasons which are related, the richness of the windows platform tends to distance developers from the algorithms that work on the data meaning many working developers no longer thing about questions like whether a hash table, a red-black tree or an AVL tree will give better performance for a given dataset. Instead this consideration is off loaded onto the database server and the DBA. As a consequence many web developers do not even consider the memory usage of their scripts. There also tends to be less emphasis on these issues in ICT courses with discussion of these types of issues being eaither restricted to covering them only as they apply to database administrators or only covered in detail in advanced placement programming courses. Where they are covered, examples tend to be divorced from any real world examples. It is simply taken as a given that a database is required for even the simplest dynamic web sites.

A contributing factor to this problem is companies like Dell shipping their popular range of poweredge servers with only 512Mb of ram in the standard configuration. In larger environments where there is a dedicated staff managing the hardware side of the hosting environment, suitable configurations for the application will be chosen by experts, but in smaller environments this discision may be made by the general purchasing manager.

In the next part I will discuss implimentation of an XML based data tier and leave how to reduce or largely eliminate the compilation overhead of ASP .NET applications for a future article.
Firstly to sucessfully impliment this the application must be a properly designed 3 tier application. This means constructs like the SQLDataSource control and DataGridView control are not used. As a general rule these controls lead to poor design patterns and should not be used. The ObjectDataSource is prefered if these controls must be used at all. In the attached screencast I will show two examples of a simple well designed 3 teir application which uses an XML based data teir. The basic pattern is largely the same between the two examples, but there are slight differences in each implementation based on the typical use case of the application. Both of these examples assume they are running on a dedicated server with 512Mb of ram (ie not meeting the minimum hardware requirement for running IIS and SQL Server on the same hardware). I will discuss playing nice in a shared hosting environment in a future article.