Can You Code?

You can all read, write and do arithmetic, but can you code? Should you code?

It would be interesting to see who can, who cares and what the impact is for physical security professionals.

Obviously coding competency ranges from 'hello world' to developing huge enterprise systems but to give some basic metric let's say someone who can code can handle something like this:

"Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”."

So can you code?

First, vote inside:


I keep meaning to learn. I've watched a some videos on Coursera and read a bunch of Wikipedia pages.

There's a ton of sites now that teach coding. I like the sites that are interactive and show you a command prompt and walk you through coding. I think that gives you a better feel of what is going on than learning abstractly / reading a book or watching a video.

Of those interactive coding training sites, I am not sure which is best or better. I know there is CodeSchool, CodeAcademy, etc.

I thinking knowing how to code, at least at some basic level, is important for anyone in technology fields (well not PR people, I suppose...)

(1) Working in software development is not only intellectual demanding, it is financially rewarding. It also enables you to do more on your own (i.e. build things).

(2) Even if you never develop anything personally, knowing how development works and what it takes to develop different functions or features is very helpful for anyone in sales engineering or senior roles in sales and marketing.

I've seen lots of senior people whose cluelessness on development lead to bad business decisions, as they vastly undersestimate how hard certain things they want are and miss figuring out new features that are simple to implement but can provide significant competitive advantage.

This has certainly been a great help for me at IPVM. Rather than doing a bland/limited WordPress site, I developed the original site, the original News Spider and the original Camera Finder. Now I am essentially product manager, specifying features and it is extremely useful to have a good sense of what can be done, so we can more quickly release valuable but simple to implement features and figure out the best ways to approach harder ones. Speaking of which, check out all the new improvements in the Calculator.

That said, there are some limits in the benefits of coding, especially for integrators, given how limited APIs are for most physical security systems and how time consuming it can be to get started and get help. Certainly some things can be done but that tends to limit it to bigger projects but even for them if you can develop some software optimizing things for your clients it could be a big differentiator.

I've seen lots of senior people whose cluelessness on development lead to bad business decisions, as they vastly undersestimate how hard certain things they want are and miss figuring out new features that are simple to implement but can provide significant competitive advantage.

I agree with this.

But I don't think necessarily knowing 'how to code' equates to the kind of knowledge necessary to alleviate the problem or exploit the opportunities.

In today's world, the technological battle is about 10% code and about 90% frameworks, APIs and libraries in the context of a particular software architecture and platform. There are implications that if you know how to code you also are probably dealing with these other things, but skill and experience varies more greatly in these 'other things' than it does in coding skill. A modern technologists' ability to recognize, understand and operate in context is their most important skill.

I seem to think this came up here in IPVM when it first hit the streets but maybe not. At any rate I seriously believe this interactive piece on 'how to code' can be of tremendous benefit to anybody who deals with technology in the modern world. In particular because of its emphasis on the context of code and how it's applied to technology.

http://www.bloomberg.com/graphics/2015-paul-ford-what-is-code/

"In today's world, the technological battle is about 10% code and about 90% frameworks"

Agreed. Though I used the fizzbuzz example to keep it simple, what I mean (and you mean by coding) is using code with frameworks to do practical things. Otherwise, it's literally academic.

Almost everyone now builds upon existing class libraries, interfaces, etc. to get things done. If you send email programatically, you are not going to do everything from scratch, you are going to get the class library in whatever framework or environment you are working in, and call the relevant methods.

Likewise, if you are going to use maps or billing or authentication or running on an iPhone (xCode :) or whatever, you are going to be building on existing libraries.

So I agree with you it is critical then to understand what is available, being able to read documentation to get a basic sense of what is included or not (i.e., what is likely quick vs what might take a lot of work), etc.

I do think it's important to note that if one is code illiterate, being able to read such documentation is going to be very hard. To that end, learn basic 'coding' but make sure you are using it with real class libraries and APIs to better understand how you can build real systems.

Please Define what Code?

Binary

Hexidecimal

Basic

Gwbasic

Fortran

Cobal

C

C++

Scripting, Gamming code ?

? so many types, so many options, so may differents ways to code

I forgot that I used to program alarm panels in hex. So I guess I can code, I just can't code anything useful.

You are seriously dating yourself. Let's keep to things people use widely in production today (i.e., not Basic, Fortan, Cobol). Here's a widely cited index.

I did code some time while in High school + University + 2 years after ... but i gave up . And i think the language is not the most important thing of it. Even if you only know Basic or Fortran and you practiced it for a reasonable number of projects you should get an algorithmic approach to problems which i think is of great value.

I plan on teaching my kids to code, in whatever language ( i hear Python is cool now ), just so they learn how to think "more"/"better".

And, in our business, i think it is very usefull to have a common sense about how software is written and how hard it is to be done, even if you don't know to do it yourself end-to-end.

Well with this generation its mostly point and click programming and I used to have to program hex, machine,binary and other forms of code on a regular basis's.

Now code is point and click , drop and drag, or other options.

I still have to use programming with My URC's, and Vms's.

IE exacq s Lenix based systems .

But; thats right code's go back a long way with me. well seasoned veterans like us.

All my fire systems, security system's, access control systems have to be programmed, but with predefined options and formats to choose from.

Anyone from the industry who is a lead, or journeyman should be programming in this gen. or thier just another laborer

You cannot, not program

Excell spreadsheats use the programming to some extent , if your trying to see the impact results of show anything about the systems operations.

"Now code is point and click , drop and drag, or other options."

Oh, so you have never touched any javascript? :)

IMO knowing how to code beyond a basic level is immensely valuable. I can't count how many times I've written some "glue" to make 2 things talk, or to put up a basic web service.

It's also helpful to understand programming fundamentals so that you can better gauge how practical a given request is (or isn't).

I have some sort of IDE open almost constantly on my laptop, in fact I'm working on a couple of coding projects right now to prototype some customer feature requests.

I started teaching myself BASIC when I was maybe 10, but it took so long to get anything done I quit.

I took a course on Visual Basic in college (required, though the semester before I got there they taught C++ which I would've preferred) and got an A.

I have taught myself to varying degrees PHP and C++ and JavaScript but only to the level I needed them for, which wasn't much, and I've forgotten mostly all of it. I've lately had to learn some Groovy (which I hate) because I wanted my SmartThings system at home to do specific things that other apps weren't doing. I learned it enough to mostly make that work.

In general, though, coding is the most tedious thing I could do. I hate it.

I don't mind scripting things, and I like making things work together to automate tasks or events, but ask me to code from scratch and I hate it.

And I agree that most APIs are so weak there's not much need to custom code things in security. If you can figure out how to work CGI, REST commands, and send/receive serial over IP, you're probably going to cover most of what you need.

I started teaching myself BASIC when I was maybe 10, but it took so long to get anything done I quit.

LOL, I think I was 10 when I started as well on BASIC. I was trying to create a program to show a calendar with the day highlighted. I remember I started in November and finished in January. By that time a calendar showing last November wasn't very useful anymore.

That's about accurate.

I do remember writing really intense batch files that basically created my own user profile system for the old family Pentium Pro. And it loaded up Windows 3.1 (the worst) or not depending one what you were doing. And tweaked all my DOS settings when I logged in so it would perform for specific games.

I was a nerdy 13 year old at that point.

5 CLS

10 PRINT "Ethan is RAD!"

20 GOTO 10

/RUN

LOL also :). 10 also when i was teaching myself Basic ( on a Commodore) . But it went faster for me, i had 20 or 30 Commodore magazines and copied code from there !. In a few hours i could do whatever the magazine guy wanted to do, but it was sad after i've done it all :)

Shouldn't the vote have a forth option that says "Uhh? What?"

Let me guess, your previous career was in product marketing?

:)

Yes, basic coding in Java and C++ in college.

My friend and I actually made a baby virus that we uploaded to our instructers laptop that would write hidden .txt file notepad documents that would boot on startup, fill the doc with "Hello Mr. (instructor's name), regards from (me and my buddy)" 1,000 times, and we had those .txt files dump to his TEMP folder.

We ended up telling him about it near the middle of the semester and gave us both extra credit. Glad he had a sense of humor.

I also took an AI coding class in college in which we programmed video game tanks to manuever around obstacles and learn where numerical checkpoints were on a map and navigating to each of them sequentially. THAT was mind numbingly difficult and took the whole semester, but incredibly neat to learn how an AI operates and retains/recalls information.

FOR x=1 TO 100

IF (x MOD 3 == 0) THEN

PRINT "Fizz"

END IF

IF (x MOD 5 == 0) THEN

PRINT "Buzz"

ELSEIF NOT(x MOD 3 == 0) THEN

PRINT x

END IF

NEXT X

Can it be done shorter and/or without the redundant compare?

Edit: <add indentation and END IF for clarity>

Except this is kind of wrong (assuming implicit newlines...I have no idea what languages this is), because integers divisible by both 3 and 5 will only say "Fizz" and not "FizzBuzz". Editing your code, you would want to do:

FOR x=1 TO 100

IF (x MOD 3 == 0 && x MOD 5) THEN

PRINT "FizzBuzz"

ELSEIF (x MOD 3 == 0) THEN

PRINT "Fizz"

ELSEIF (x MOD 5 == 0) THEN

PRINT "Buzz"

ELSEIF NOT(x MOD 3 == 0) THEN

PRINT x

NEXT X

The if statements are one line c style ifs

like in c

i added end ifs to make it clear, look now

p.s. That unauthorized rewrite has 4 redundant compares and one redundant print. :)

My original has one redundant compare.

At Eagle Eye we are actively looking for a few software developers, so we interview candidates on a constant basis. We're based in Austin, which is a very tech savvy town and yet about 50% of the people that come in can't do the Fizz Buzz test succesfully.

It's amazing to me (in a bad way) that people who are applying for a software development job can't even string together a couple of loops.

We're based in Austin, which is a very tech savvy town and yet about 50% of the people that come in can't do the Fizz Buzz test succesfully.

I thought John made up the question. When I was trying to do it, I kept thinking, what a dumb question with no elegant solution.

Which is the point. The real world is always messy.

Back, way before fizz buzz, I used to give simple programming tests to new hires, like "write a program that inputs 10 integers and then prints them back in order of low to-high, with no higher level functions."

Months after failing, I would get ex-candidates e-mailing solutions, sometimes still wrong!

Programmers today should be way advanced from 20 years ago, what with the advantages of the internet.

I remember a time when the only manual of SCO unix that was in the office had both covers ripped off of it and was chained to the sysadmins chair. And you were glad it was there...

Yes,

I do not consider my self a programmer but I have found that just exploring, dabbling in the following technologies has increased my level of discernment in purchasing decisions and empowered me to create competitive tailored solutions.

1. Python, SQL, PHP, and Bash for Linux centric glue among JSON, SOAP, XML, REST and XYZ API calls.

2. C for AIO , DIO event loops on embedded devices.

3. Python and C++ frameworks like Wx and Qt for more involved projects. OpenCV, Deep Learning .

From the above list, 1 & 2 have returned the fastest results for my investment in learning. Pursuing items in 3 may some day result in a big payoff but has immediate value in fine tuning the needle on my BS detector.

"A lot" has the same amount of votes as "Not really" - with both tied for the lead just ahead of "A little'.

For a skillset that is generally rewarded with much higher salaries outside our industry, I would've expected to see less voting "A lot".

This type of poll is heavily biased towards coders.

Consider if I take a poll asking whether you can bowl well. If you, like a lot, don't bowl much, you may or may not vote. But if you DO bowl well, you are probably gonna vote, right?

Triple the votes for the "not really" crowd, and double the votes for the "a liitle" group might be closer to an actual distribution. Then again maybe not. :)

The poll numbers seem skewed based on what and who I know in the industry. For integrators (counting everyone - sales, management, techs), I think the percentage for 'a lot' is 5%. For manufacturers (again counting everyone), more but still in the sub 25% range.

Part of the skew is (1) people who read IPVM and (2) people who read topics like 'Can You Code?'

This is a great discussion. We are an installation company that rely on the manufacturers to couple the software with the hardware. We install products that have APIs and SOAP interfaces. Data synchronization and integration with other products while interesting is not achievable without some coding knowledge. As a sales and business manager who understands the technologies, without a coding background, I feel like we could build a solution with differentiation if we could build the middleware for products to communicate.

So reading the responses from others in the community who can code and share snippets of information gives me a platform to go off and do further research in these topics.

Thanks for sharing.

The Real Question here is how much time do you have to code. As so many have writen the code to the hardware level and its so complicated to do.

Should You?

Too many time s have i got into the program and spent hours trying to figure out what i did and how it would change the operations.

Any skilled programmer, Eng. knows it takes up a lot of time and then does it work with out any hickups.

Back in the day you used to be able to program with in a couple of hours , Now with complicated algorithums that link, command,and structure, multiple cpus,tasking,and chipsets.

Why would you want to go thru the painful, time consuming task.

Tech support Knows thier system and thier engineers know thier software.

"Back in the day you used to be able to program with in a couple of hours"

What? Pretty much everyone agrees that programming is far easier today than it was years ago and you can do a lot more because you leverage so many existing libraries / APIs, etc.

I do agree though, that when it comes to surveillance applications, unless you have a very large project or have some way you can reuse your code on multiple projects, for integrators, it typically does not make economic sense to do custom development, especially since most manufacturers make it hard to integrate with their products.

Related: Back at the turn of the Century, my partner and I, Jack Hughes, sold our interests in the consultancy that we had grown. After going our separate ways, he started topcoder.com, which has since grown to be a 500,000+ member community dedicated to coding excellence.

Back in our fledgling consultancy days, we had continual code-offs, both formal and informal, designed to encourage developers to sharpen their skills, internally. With topcoder, the idea was to take this concept outside of the organization and create challenging coding competitions, and award real prizes, ($72,000,000 awarded to date), to create a pool of proven performers.

A Super Bowl for Geeks.

The large awards were made possible because of the revenues generated by selling recruiting access to the winners of the competitions.

Certainly Jack had a unquie vision here.

Here's one of their videos from a recent finale.

That's really cool!

The surveillance industry has its own well known contest...

I wonder though what could be done for security integrators. Any ideas?

The camera calculator and camera finder could be used as the basis for an interesting challenge of ones surveillance smarts.

Given a complex floorplan, one would have to fully cover all areas at the specified ppf, by placing multiple cameras, at various focal lengths and positions, in a timed competition. Whoever does it the cheapest, wins!

Hardware could be restricted to a subset if helpful; an Avigilon only contest between M. Miller vs. A. Thomas for instance, both live streaming their desktops in a ten minute design-off, might be both entertaining and instructional.

Of course the "winning" solution would be unlikely to be the best, but regardless, integrators who intuitively have a feel for differing approaches and trade offs will do better. And less experienced combatants would gain by doing instead of reading.

why does cheapest win? and why timed?

why does cheapest win?

Because it is a easily calculated metric that has at least some relevance to the real world.

It would be preferable to reward the "best" solution of course, but how could one fairly judge solutions? Also, the questions would be harder to construct, as they would have to provide detailed data as to the goals and givens of each problem.

Take a look at the Integrator Challenge for that type of competition.

The are other metrics possible, fewest cameras for instance, but in any event, to provide a competition that can be adjudicated with as little subjective analysis as possible was what I was going for.

and why timed?

Because life is timed. And to make it more interesting for those in the gallery.

What would you suggest?

I spent 10 years as a software developer before going to work with an integrator. I find working with VMS/Access Control systems to not be chanllenging at all after the complex programming I used to write. I have used my skills to write custom interfaces using APIs provided by manufacturers to integrate 2 products together at a fraction of the cost of the manufacturer's custom services divisions. I have lost count as to how many times I have one piece of data going to another system or importing from another system.

While I am sure I am not as efficient as I was 10 years ago, I can troubleshoot issues with the best of them in the field (even though I don't pick up a screwdriver).

Back in the early 90's we were doing client server development with ashton tate (now SQL server), Gupta and other stuff, and we discovered early if the developers weren't developing their skills early and on their own, they'll likely not be a top performer. We also learned smaller development teams were more productive, and more dificult to manage. We flamed out in 95, and abandoned development. I admire those that were able to build synergy and overcome those problems.

Over the years I've seen hundreds of ideas for an application, I keep my enthusiam is check, because marketing and sales is the hardest part.

As for contests, I yield to M. Miller.

As for contests, I yield to M. Miller.

Did I mention the PTMP Wireless Topology Challenge? :)

I could write code to do the above in some BASIC derivative but I guess I do not see proficiency in that level of coding as being useful. If anything, I would say lack of coding experience is my own biggest failing as an integrator. There are many times I have said "we could do something wonderful with this data" but with no knowledge on how to query it, make use of it, and with no budget to outsource I have been unable to make those changes. With some level of coding skill we could really take integration to a higher level. I am jealous of those that can.

A big problem is finding relevant training to what I would like to code for. I don't even know where to start. Is IPVM looking at providing some articles/training/other resources pertaining to coding? If so, I will be first in line.

Falsely implying someone is from (northern?) NJ* is a bit harsh, no?.

Speaking of und6, is it a LPC camera above his head?

*License plate

Hiring a programmer without FizzBuzzing them first is like hiring a wedding singer without hearing them sing.

What type of coding, assembler, compiler or Silverlight vs Basic vs C sharp.

Machine Language? Octal or binary? I saw the results, being an old systems engineer for Honeywell and IBM, I kind believe that there is slight fudging on the answers.

How many of those answered have gotten thier MCSE or A+. How many have even taken a formal Cisco course. Again who is familiar with Unix, redHat etc.

IMHO. John M.

"How many of those answered have gotten thier MCSE or A+. How many have even taken a formal Cisco course. Again who is familiar with Unix, redHat etc."

Getting an MCSE or A+ requires no software development expertise. Same thing with Cisco courses. They are worthwhile in themselves and more directly applicable to video surveillance integrators, but different.

I must say that it is amazing how many software developers lack basic IT skills. Just last week I had to explain how subnet masks work to a young (otherwise exceptional) developer. Those certifications do have value, if only to guarantee one learned this stuff at least once.

Knowing how to program/code doesn't necessarily mean you know anything about IT. These disciplines are entirely different. When I went to school there was no such thing as IT; it was computer science/engineering. There was information science but that dealt more on the application side which could be similar to what is now big data.

The skillset and personality types for good network engineers and good developers are very different. Smarts one have books - Wise ones have scars.

Swift Code:

for i in 1...100 {
switch i {
case _ where i % 3 == 0 && i % 5 == 0:
print("fizzbuzz")
case _ where i % 3 == 0:
print("fizz")
case _ where i % 5 == 0:
print("buzz")
default:
print(i)
}
}

Nice work Jon!

Never heard of swift.

Maybe also?

for i in 1...100{
switch i {
case _ where i % 15 == 0:
print("fizzbuzz")
case _ where i % 3 == 0:
print("fizz")
case _ where i % 5 == 0:
print("buzz")
default:
print(i)
}
}

Cool, Swift is iOS programming language used in xCode :)

I'm really dating myself with this post. In my late teens, I coded (and sold) video games for the Atari 400/800 personal computer platform (written in 6502 assembly language). Talk about a low level language. And this was back in the days when a coder was responsible for most, if not all, of the game development (coding, graphics, levels, sound effects, music, manual, retail packaging). And the media was a cassette tape… makes the floppy disk seem high tech.

Of course the days of the single developer are back with the popularity of mobile apps, albeit with much more modern development tools (my development tools were graph paper and the bible of coding for the platform, De Re Atari). To this day I never bothered to learn a high level language like Basic, C or Javascript. But if I was in a MacGyver situation and had to re-program a device that had a 6502 CPU, I could save the day!

:)

Undisclosed 3, thanks for posting. Now that's real coding!

I forgot the Apple II was also 6502 based.

This reminds me of a drinking game we played in college called Buzz. You had to go around the room and count, when a 7, double digit, or mutliple of 7 came up, you had to say buzz. If you missed it, you had to drink.

Maybe if I'd spent less time playing buzz, I could have learned how to program it.

I entertained the idea of majoring in computer science in college, i quickly realized it wasn't going to be for me... in my first year courses we programmed using ada... coding is someting I would like to grow in my knowledge in more, my oldest daughtere is currently learning python and I am learning along with her... Code Academy and Code School look like great sites I am going to check them out for my daughters...

www.udemy.com is a great place to take classes on different coding platforms. Sometimes the classes get discounted to $15. It is especially good to have a project you are working towards to motivate and create the passion for learning and getting through the tough parts. I am finding that a new part of the brain unlocks when you have to think code logic. It's not something we do everyday and it is super empowering to complete a program or app that increases productivity and efficiency.

I agree, I bought a udemy class on StackSocial.com for 1.99 and it was excellent.