Another computer question...

What's going on here? It's been popping up when I run a search from the browser bar – anyone else getting similar?

IMG_4879.jpeg
 
What's going on here? It's been popping up when I run a search from the browser bar – anyone else getting similar?

View attachment 7680
I don't usually use Google but I switched (temporarily) to it and didn't get the message. Probably didn't do enough searching to trigger it. One possibility is that you or someone using the same ISP have been bombarding Google with rapid requests. I've had similar messages from other sites when I've only accessed it once. As far as I could tell I wasn't infected with a virus/bot or whatever. So it must be another user(s) on the same ISP (?).
 
I had BBC News on in the background and caught a bit of "Tech Now". Some deformed code scrolled up the screen and I saw a construct which I've probably used but I don't think is good practice.
The code appeared to be Python and went something like
Python:
For i,j in something
    # some code
    if raw < T:
        continue
    # some more code
# end of loop
Isn't it preferable to reverse the condition in the "if" such that
Python:
For i,j in something
    # some code
    if raw >= T:
        # some more code
# end for loop
(In Python the indent replaces { and } in C, Java etc.)

I will probably still use the first construct occasionally, but I think it hampers clarity and complicates debugging. What do other programmers think?
 
I have no idea about Python, but in general it is easier to read code (it requires less nesting) if the exception is tested first. That way, the "break" (if the exception is true) is only one line and nested +1, while the non-exception code doesn't need to be nested at all.
 
I think it hampers clarity and complicates debugging. What do other programmers think?
I use whatever feels right in each particular case, but generally would do what you suggest. Sometimes if the indentation level gets too annoying I'll stick the "continue" or "break" in, but generally that means the function needs splitting up anyway.
I get annoyed with stuff that sticks religiously to 80 character limits as well. It's 2026, not 1986 and we are not using 80x25 displays any more. Of course, excessively long lines get even more annoying, so I usually limit them to about 120.
 
That way, the "break" (if the exception is true) is only one line and nested +1, while the non-exception code doesn't need to be nested at all.
All true, and excessive nesting is a right pain.
It just had me thinking of the old argument that followed early BASIC and FORTRAN IV - the goto statement. The continue is behaving like a "goto end of loop".
I have no idea about Python,
I've written one very short program and waded through other people's code. I only quoted Python as this appeared to be what was listed on "Tech Now". I would have preferred C or, at a push, C++ or Java.
 
Anybody got ideas...

Short of installing zeroconf on network-addressable devices (which I can't), I am reduced to freezing their IP addresses at my router and typing numbers from memory into the address bar. I do have a private web page with links coded, but that's an external access to act as a look-up table for internal accesses, and complex to keep updated!

What I need is a local DNS. Always-on things I could possibly run a DNS on are the Humii or my router (Netgear DGND3700v2). I can't find any such option in the Netgear admin panel.
 
Back
Top