Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

Saul Johnson

@Saul Johnson
About
Posts
127
Topics
49
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Visual Basic for mAsochists (VBA)
    S Saul Johnson

    You, my friend, are amazing. :) Thanks!

    A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.

    The Lounge help lounge csharp java

  • Visual Basic for mAsochists (VBA)
    S Saul Johnson

    Now before I start this rant, I mean no insult to any VBA programmers out there reading this. I could not have greater admiration for you for succeeding where I have failed in actually accomplishing anything in VBA for Excel without lines and lines of hacks and botched, messy code. I want to get the general consensus on this, as it has been bugging me no end. My first gripe is that the VBA programming environment that comes with Office (2007) is to my eyes just utter tat. It is currently removing and inserting random whitespace here there and everywhere in what seems to be an overtly malicious attempt to mess with my head. The 'intellisense' and 'syntax highlighting' leave much to be desired, but I could whine about that all day, so I'll stop there. In my opinion however, the absolute worst thing about the VBA editor that shipped with Excel 2007 is... The environment alerts you to coding errors with - get this - a MODAL messagebox that totally interrupts what you're trying to accomplish by screaming in your face until you click the stupid 'OK' button. Secondly it seems to be to be impossible, or at least highly impractical, to accomplish anything approaching an elegant solution to a problem using VBA in Excel. So far this project, I have been repeatedly flummoxed by the arcane, esoteric knowledge of all the peculiarities of VBA that seems to be required to do anything at all in the language with any degree of efficiency. While I am far from being a VB guru, VB.NET is my main programming language alongside Java and also my main source of income. I was astonished to find that my half a decade of VB.NET experience did not help one jot with VBA. Is this just me? Please tell me, because I'm not sure if the problem is on my end (very possible) or with whichever dark ritual was used to create this 'programming language' in the first place.

    A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.

    The Lounge help lounge csharp java

  • What do you do if...
    S Saul Johnson

    Well that's just the thing, in this case all stock images carry non-commercial licenses as well because branded products (complete with manufacturer logos) are visible in the photos. Normally I'd just pay for the stock photo myself as you suggest. I don't think there's a way round it in this case, I'll just have to let the client know. Thanks though. :)

    A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.

    The Lounge csharp question learning

  • What do you do if...
    S Saul Johnson

    Hi there everybody, After working for a good half a decade as a web designer, I considered myself lucky that clients have always provided their own photos for display on their websites in the past. That or I have dipped into the stock photography libraries that are so plentiful online (at the client's expense of course). A recent client, however, said "just grab some photos from Google Images" and left it at that. This left me at somewhat of a loss for what to do. If I use an image on their site that I've just plucked from a Google Image search and the owner of the image chases it up then I'll get in trouble for it. If I try to explain to the client that Google Images isn't really just a huge library of free photos ripe for the taking then I'm sure they'll just laugh it off and tell me to get on with it anyway. What, my dear friends, would you do in this situation? SixOfTheClock

    A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.

    The Lounge csharp question learning

  • The VB Stigma
    S Saul Johnson

    Hello Everybody, As a software developer that has used VB.NET for several projects over the years, I am used to the look that I sometimes get whenever my VB work comes up in conversation. It says "Oh, that's cute. When you grow up, maybe you'd like to try C#. It's got curly braces and everything!". Those with opinions on whether or not VB.NET is a 'real' programming language or not generally fall into one of three categories: 1. Those that have worked in it and enjoy using it. While it is not my only (or even my main) programming language, I proudly include myself in this group. 2. Those that have tried it and after doing so decide they don't like it because it's too verbose etc. That's completely fine by me, no language is for everybody. 3. Those that have acquired an illogical, extreme hatred for it through an unholy combination of hearsay, rumour and code samples (often VB6) they've seen on the internet. They have never tried it and so are horribly uninformed on the topic. They say things like "VB isn't a real language!" and "VB is a language for babies!". It is with this group that I take issue. Today, I overheard a colleague inflating his own head by bragging about the progress he was making on his C++ course while designing a class in Java with another colleague. He had just finished calling VB a 'baby language' among other things when I caught this little gem: "What's the point in declaring things as private? Just declare everything as public. That way nothing will break." For someone with such a billowing ego when it comes to his experience with 'real' programming languages, that last sentence demonstrates without a doubt that beneath the haughty 'I'm a real programmer' exterior lies a secret - 'I have got no idea what I'm talking about'. This is an example of the VB Stigma in action. People have flaunted their negative opinions of the language to my face even when they know that I have worked on several successful VB.NET projects with other programmers in the past. I find myself having to lead a secret life as 'one of those VB people' to avoid being looked down upon. My question is - why? It is built on exactly the same technology as C#, but I very rarely hear that talked about with the kind of vitriol that some people seem to reserve for Visual Basic. Do some people really need these things '{}' every couple of lines to feel like they're actually programming? In my opinion, for what it's worth, one of the best things about programming is the diverse tool

    The Lounge csharp question c++ java

  • Bytes overflowing despite modulo... [Solved]
    S Saul Johnson

    Well, couldn't have asked for it any clearer than that! Thank you. :)

    A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.

    Visual Basic help csharp

  • Updater Help
    S Saul Johnson

    Hi Bryan, just to let you know that nobody here is going to write the code and paste it here for you for two reasons: 1. We're here because we want to help people with specific questions about programming, not take on programming tasks on your behalf. You'll need to hire someone for that. 2. That kind of vagueness makes it impossible for anybody reading your question to know what you're talking about, let alone start to help you out. Do you mean hide the downloaded executable file on-disk? There's no way we can know for sure to give a useful answer unless you're more specific. Then and only then can we help you out. I direct you to the "How to get an answer to your question" message posted by Chris Maunder. It's up at the top of the message board there. Good luck with your project. :)

    A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.

    Visual Basic help question

  • Bytes overflowing despite modulo... [Solved]
    S Saul Johnson

    Hello, I've been thinking about this one for a long time. The following code always gives me an OverflowException when I run it:

    Dim x As Byte = 200
    Dim y As Byte = 100
    Dim z As Byte = (x + y) Mod 256

    I know the problem is the fact that I'm adding two byte values together, which is exceeding the limits of the data type in the intermediate step (x + y) before the modulo 256 is performed and the result assigned to z. I can fix it if I do this:

    Dim x As Byte = 200
    Dim y As Byte = 100
    Dim z As Byte = (CInt(x) + CInt(y)) Mod 256

    But that just seems like a lot of bother to achieve something that should be simple. One of my latest projects involved a lot of arithmetic like this and I can't help but wonder whether or not there's a better way of performing pure byte arithmetic with modulo operations without resorting to declaring larger integers all over the place or casting to and from them in code. SixOfTheClock

    A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.

    Visual Basic help csharp

  • Please, poke holes in my cryptographic function...
    S Saul Johnson

    Hello, I'm a complete newbie to the field of cryptographic algorithms themselves, always having relied on third-party libraries and code in the past. Now I'm starting to poke around with them by myself I finally managed to throw together some sort of tiny cryptographic library in VB.NET. However, I'm concerned that... quite frankly... it's a bit rubbish. Sorry about the long code block here:

    Imports System.Numerics

    Public Class BlumBlumShub

    Private \_x As BigInteger
    Private \_p As BigInteger
    Private \_q As BigInteger
    Private \_m As BigInteger
    
    Private \_pow As New BigInteger(2)
    
    Public Function NextNumber() As BigInteger
        \_x = BigInteger.ModPow(\_x, \_pow, \_m)
        Return \_x
    End Function
    
    Public Sub New(ByVal seed As BigInteger)
        \_p = BigInteger.Parse("32416190071")
        \_q = BigInteger.Parse("32416185031")
        \_x = seed
        \_m = BigInteger.Multiply(\_p, \_q)
    End Sub
    

    End Class

    Public Class RandomBitStream

    Private \_b As BlumBlumShub
    
    Public Function ReadByte() As Byte
        Dim num As Byte = 0
        For i = 1 To 8
            num += Math.Pow(i, 2) \* If(\_b.NextNumber().IsEven, 1, 0)
        Next
        Return num
    End Function
    
    Public Sub New(ByVal seed As BigInteger)
        \_b = New BlumBlumShub(seed)
    End Sub
    

    End Class

    Public Class BlumXor

    Private \_bitSrc As RandomBitStream
    Private \_key As BigInteger
    
    Public Sub Cipher(ByRef message As Byte())
        \_bitSrc = New RandomBitStream(\_key)
        For i = 0 To message.Length - 1
            message(i) = \_bitSrc.ReadByte() Xor message(i)
        Next
    End Sub
    
    Public Function ByteToStr(ByVal inByte As Byte) As String
        Return inByte.ToString().PadLeft(3, "0")
    End Function
    
    Public Sub New(ByVal keyStr As String)
        Dim encoder As New System.Text.ASCIIEncoding()
        Dim keyBytes As Byte() = encoder.GetBytes(keyStr)
        \_key = BigInteger.Parse(String.Join("", Array.ConvertAll(Of Byte, String)(keyBytes, New System.Converter(Of Byte, String)(AddressOf ByteToStr))))
    End Sub
    

    End Class

    And that is that. Firstly, I think my implementation of the BlumBlumShub PRNG is off, secondly I'm not entirely sure that I should be using the parity of numbers generated to give me random bits and thirdly I'm not so sure about my use of Xor or how I'm generating a seed integer for the PRNG from a string. I welcome the input and criticism of any cryptographers or ma

    Algorithms csharp data-structures lounge

  • Securing Local Files [Solved]
    S Saul Johnson

    Another way to make things that little bit more difficult to figure out for anyone with mischief on their mind. Excellent thank you. SixOfTheClock

    A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.

    Visual Basic security csharp help

  • Securing Local Files [Solved]
    S Saul Johnson

    Hello, That's a very clever suggestion that I certainly wouldn't have thought of, and I'll undoubtedly be looking into it. Thank you very much indeed. SixOfTheClock

    A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.

    Visual Basic security csharp help

  • Securing Local Files [Solved]
    S Saul Johnson

    Hello, Thank you for your answer. This is undoubtedly how I would go about authenticating passwords in any other circumstances but these, generating hashes using MD5 or (my personal preference) SHA-256. I am working with a web service from a Windows Forms application, and a password is required to work with this web service. Usually, I'd show a prompt and ask the user to input the password to authenticate when it starts, but the user requirements state that users must not need to enter any sort of authentication information in order to work with the application in the interest of ease-of-use. What I was looking for was a way to store this username and password locally in such a way that only my application would be able to access and use them. As it seems that this isn't really possible, I've put in place stricter controls and guidelines for where and when the software can be used and used misdirection and obfuscation as suggested by previous answers to make it more difficult for these credentials to be stolen. However, as you correctly say, the only way to really keep a password safe it to authenticate against its hash. SixOfTheClock

    A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.

    Visual Basic security csharp help

  • Securing Local Files [Solved]
    S Saul Johnson

    Very sensible idea there, and very true about the sensitive data. If the point of my application is to search through and display said sensitive data then it would be impossible to completely secure for that very reason. Thank you for your reply, this seems like a better way to go about it and is well worth testing out. :D

    A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.

    Visual Basic security csharp help

  • Securing Local Files [Solved]
    S Saul Johnson

    Ah, I thought as much. I'll take a look into these options, thank you very much indeed! :D

    A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.

    Visual Basic security csharp help

  • Will Windows 8/Metro be dead on arrival?
    S Saul Johnson

    Yes, here we go again. I realise that this topic has probably been brought up countless times over the past few months but I have to know... what is the general consensus in the developer community about the upcoming release of Windows 8? I know Microsoft wanted to make some big changes to help them break into the tablet market, but is all the ridiculous flipping about between desktop/Metro mode the future or a great big waste of time? Was the removal of the Start Menu from the desktop a step too far? What do you think? All I know is that I won't be scrambling to this new OS for a good while yet if the final release on the 26th of October turns out like I think it might. :|

    A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.

    The Lounge question csharp mobile help discussion

  • Securing Local Files [Solved]
    S Saul Johnson

    Hello, My VB.NET application currently securely downloads a username and password required to access a web service that contains sensitive data. The problem I face now is storing that username and password on-disk in a secure manner for future use. I've looked into various encryption algorithms etc. but all involve storing some kind of key for decryption locally (rendering the encryption a bit of a joke) or hard-coding the key into the application (difficult-to-maintain and just about as useful as the last option). I welcome any suggestions as to how relatively secure local storage of a username and password might be accomplished. Despite hours of wracking my brains poking about in the System.Security.Cryptography namespace I'm no closer to finding a solution than I was at the start. SixOfTheClock

    A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.

    Visual Basic security csharp help

  • Those Little Annoyances...
    S Saul Johnson

    If you were doing freelance programming work and had to choose your next client for a medium-term project, would you pick:

    1. The client that regularly looks at your C++ source code and points out your 'overuse' of semicolons while often stating aloud that he used to program in Fortran back in '86 and could do your job much better than you if only he had the time.

    2. The client that stands over your shoulder and says things like 'A little to the left' and 'I think that button needs to be bluer'.

    3. The client that hands you a sheet of paper saying something like 'A software package that will take our company to the position of industry leader in 3D rendering solutions.' and calls it a project spec, failing to give any useful input whatsoever.

    4. The client that calls you at 3:00am and asks how the project is going.

    5. The client that wants it done by next weekend.

    While I realise none of these are ideal choices, imagine that you're depending on the one you choose for your next pay-check and all are offering a similar sum of money for a completed project. Violence is not an option. Which would you choose?

    A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.

    The Lounge career csharp c++ question

  • Bathroom Mystery
    S Saul Johnson

    I'm as baffled as you are, but this might be the only time I'll ever have just cause to link to this article, so here goes: http://en.wikipedia.org/wiki/Human_defecation_postures[^] He may have been trying to invent some kind of new backwards-facing 'squatting' position and it backfired (literally) by which time the damage was done. At this point he probably figured that fleeing the scene would be the best course of action and left the stall in the sorry state you found it in. You never know.

    A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.

    The Lounge tutorial

  • A Veritable Piece of Rudeness...
    S Saul Johnson

    :laugh: I would have, but during the very next class he took MS PowerPointTM hung and he broke the interactive whiteboard. Destiny took care of it for me.

    A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.

    The Lounge csharp adobe json career

  • A Veritable Piece of Rudeness...
    S Saul Johnson

    I was talking to a non-parental authority figure that I know recently and the conversation drifted towards programming. I briefly mentioned that I have some articles here on CP. I didn't give him my résumé or anything, merely brushed the topic of article-writing. His eyes showed what I thought was a spark of interest. How wrong I was... Being a naïve soul, I stood there with my chest puffed out and drawn up to full height, sure in the knowledge that I would receive an ego-boosting congratulations on my contribution (however meagre) to the programming community. Here's the essence of the first thing he said after this, to my face: "I can't stand students who think they know everything and go on about IT topics that the rest of the class can't understand like Visual Basic and stuff. It just makes my job harder." I was paraphrasing there, but not much. My head deflated like a hot air balloon coming into land and yes, my eyes smarted slightly. This man is a professor.

    A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.

    The Lounge csharp adobe json career
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups