Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Every few months (usually shortly after one of the browsers gets a new release) a review comes out with the results of benchmarks on the major browsers showing how each performs in several areas. Usually (surprise surprise) IE comes out as sub-par while browsers like Chrome and Firefox bobble around at the top, trading places occasionally. I've tried both and prefer Firefox because of the user interface. Chrome may outperform it on some benchmarks (at least this month), but just because it may render 3% faster in the benchmark, are you really going to notice the difference?

[personal anecdote follows - feel free to stop reading now]

I worked in the control centre of a major electric utility for 29 years. The centre was manned 24x7 and I was on call frequently. I got many calls from the users of the type "the [name app] or network seems to be running slow, can you please have a look at it". Every test, even background tests which we ended up running automatically because of the complaints, showed no significant difference in the speed of the app or the network. It ended up being a perceptual problem. How slow the app or network seemed depended on how badly the operator wanted the results.

I think, for most users, perceived browser performance is affected by the users' expectations. Except for IE, of course, which just sucks. But I could be biased ;-)

flagstar commented: Nice elaborate but user concerned more about network speed over browser... +7
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I was doing a little playing around with some scrollbar controls and I noticed an odd behaviour that I was hoping someone could explain. I create three horizontal scrollbar controls, one for each primary colour. Possible values for each R, G or B are 0 to 255. When I set the min/max values to 0 and 255 it seems that the actual max I can get by sliding all the way to the right is 246. In order to allow a slideable value of 255, I have to set the maximum value to 264. This is definitely counter intuitive (or am I just having an extended "senior" moment).

Here is the code in full.

Public Class Form1

    Dim hsr(3) As System.Windows.Forms.HScrollBar

    Public Sub New()

        InitializeComponent()

        'Create three horizontal sliders, one for each R, G,and B colours
        'allowable values are from 0 to 255

        For i As Integer = 1 To 3

            hsr(i) = New System.Windows.Forms.HScrollBar
            hsr(i).Location = New System.Drawing.Point(30, 20 * i)
            hsr(i).Size = New System.Drawing.Size(300, 20)
            hsr(i).Minimum = 0
            hsr(i).Maximum = 264
            hsr(i).Value = 0
            hsr(i).SmallChange = 1
            hsr(i).Tag = i

            Me.Controls.Add(hsr(i))
            AddHandler hsr(i).ValueChanged, AddressOf ScrollColour

        Next

        SetColour()

    End Sub

    Private Sub SetColour()

        'set the bg colour depending on hscroll values

        Dim r As Integer = hsr(1).Value
        Dim g As Integer = hsr(2).Value
        Dim b As Integer = hsr(3).Value

        TextBox1.BackColor = Color.FromArgb(255, r, g, b)

    End Sub

    Private Sub ScrollColour(ByVal sender As Object, ByVal e As System.EventArgs)

        Dim hsr As System.Windows.Forms.HScrollBar = sender

        SetColour()

        Select Case hsr.Tag …
codeorder commented: interesting topic :) +11
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I know this is marked as solved but I wanted to add a link to a walkthrough from Microsoft.

Walkthrough: Encrypting and Decrypting Strings in Visual Basic

http://msdn.microsoft.com/en-us/library/ms172831.aspx

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I agree that there are some incredibly gifted programmers who have had no formal training. I disagree with the statement "if you know somebody's certified, you know that somebody is much more likely to be a bad programmer". You are saying that the level of incompetence increases with the level of education. I want to know how you came to that conclusion. I would like to see any studies that support this conclusion.

A recent item on the local news caught my attention. It seems there was a car accident in which the person survived only because he was not wearing a seat belt. I presume I can look forward to hearing my anti-seat belt friends claim that this proves that you are safer not wearing a seat belt in spite of numbers that show that you are much safer wearing a seat belt than not.

I mention this because it is my belief that for every gifted self-taught programmer there are numerous self-taught programmers who are completely delusional about their abilities. I, personally, after over 30 years as a "professional" programmer, have not met even one gifted amateur. I have, however, met dozens of keyboard cretins.

I got my computer science degree back in 1977. In order to get that degree I had to design and code a functioning assembler and a functioning compiler. I had to design and code programs to perform complex mathematical algorithms such as linear diophantine equations, splines for curve fitting, many …

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Would you care to back up those sweeping generalizations with some actual facts?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

"If you write computer programs that work correctly and are used, then you are a programmer."

That's like saying if you can nail two pieces of wood together and they don't fall apart then you are a carpenter. I would have preferred to the the statement amended as

If you write computer programs that work correctly and are used, then you are a programmer. If you can write non-trivial computer programs that work correctly, are easily maintained and easily modified and are used then you are a good programmer. Mind you, even that is not sufficient in most cases. Personally, I think we should make a distinction between programmer (anyone who programs) and professional (or certified) programmer. That is, one who has a degree or diploma from an accredited institution indicating that the individual has demonstrated a certain level of proficiency in the field of computer programming.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I posted the following in the above forum this morning...

I understand that recent changes to google search (supposedly in order to reduce the ranking of content farms) has also harmed legitimate sites such as www.daniweb.com. This has apparently reduced traffic to the site by 50%. I have found this site to be a high quality source of technical help across a wide range of disciplines and would hate to see it die because it somehow got caught in the net. Surely with the technology available some kind of exception list could be added to google search such that the quality sites like daniweb that are mistakenly identified as content farms are not treated unfairly. I contribute regularly to the forums in my areas of expertise and likewise receive help in areas in which I am less proficient. Please give this matter serious consideration. The loss of daniweb would be felt by many.

I hope it helps.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The recovery partition allows you to reset the computer back to the state it was in when it was purchased. I do free tech support for several people (friends/relatives). Lately this has consisted of installing Windows 7, then rescuing them when they destroy their system with crapware/trojans/etc. The steps I usually go through are:

1) full backup
2) wipe all partitions
3) create 40 gig C (system) partition and remainder of drive as D
4) install and configure Windows 7
5) apply all updates
6) create a disk image (I use Acronis)
7) install user apps and my choice of free apps/tools
8) create another system image
9) restore user data files to D partition

When the system gets trashed I just restore the latest C image, apply all updates since the last image then take a new image. For me, this is easier and more reliable than the recovery partition because I only ever have to configure once and apply only incremental updates. I also keep one image on the D drive and a copy on an external drive. The first image (Win 7 and updates with no apps) fits nicely on a DVD for the case when everything else fails. This way, the user is also protected if they have a hard drive failure (in which case a recovery partition would be useless anyway).

You only need the recovery partition if you want to get back to "factory".

jingda commented: Nice +6
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

To send a message to another user on the network you could try the "net send" command although I do not know if this available in your version of Windows.

royng commented: offset negative rep +5
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Our secretary once complained about all the typing she had to do. I suggested she get implants but I don't think she took it like I intended ;P

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I had the same problem with my Dell. There was a (default) hotkey combo set when I installed Windows 7. I disabled it by going to

Control Panel -> Region and Language -> Keyboards and Languages

click on Change Keyboards...

select the Advanced Key Settings tab

You can set or disable the hotkeys here.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The following function will return true if the given file is <= numsecs old. Just convert 3 hours to seconds and pass as an argument.

import os
import time

def newFile(file,numsecs):
	if time.time() - os.path.getctime(file) <= numsecs:
		return True
	else:
		return False