Thursday, October 31, 2013

Data Structures and Algorithms, what they do.

Data structures and Algorithms are an interesting subject. Data structures and the understanding of implementing and when to implement particular data structures are what allow for complex programs and applications to be created. Choosing a data structure for an algorithm/program effects everything from memory allocation, run time, search time, insertion time, and code re-usability. Typically the ideas behind build reusable blocks of code isn't hard, however when choosing data structures it can often make it rather difficult. Have your program work based off of user defined types can drastically change your code and often make it longer and harder to program.

Data structures are exactly what it sounds like. They are structures for holding data. Most data structures are represented with either a cell(http://3.bp.blogspot.com/-o0HXsxh1O-s/TzUzB7a0wlI/AAAAAAAAAZ0/OC03E2t_mBM/s1600/selection_sort_00.gif, example) or with circles often refereed to as nodes. (http://blog.cogswell.edu/wp-content/uploads/2011/04/binarysearch.gif). These structures drastically effect the performance. For example, choosing the wrong data structure in an search algorithm can often change the search time of n from nlogn to n^2. However, space can often just as important if not more important than speed.

A few common data structures are Linked Lists(The most common being Single linked List, double, and circular), Tree's(Binary Tree's, B-Tree's, Red-Black Tree's, 2-3 Tree's), Array's, Hash Tables, and Stacks.

Algorithms are logic that provides some change of state using data structures. Algorithms are generally designed being system and language independent and then are implemented to fit specification. The final result can often look very different then the initial rough draft.


Suggested Reading:
http://en.wikipedia.org/wiki/Linked_list
http://en.wikipedia.org/wiki/List_of_data_structures

Friday, October 25, 2013

Hacking, what and why?

Hacking is an interesting subject and when used, should have some sort of context associated with it. Most non technical people believe that hacking is some form of malicious activity. However, that is not is not accurate.  In the words of Richard "hacking means exploring the limits of what is possible, in a spirit of playful cleverness. Activities that display playful cleverness have "hack value". This is a decent and interesting definition. A great example of this are hackathons. Hackathons are where numerous people are invited and attend a coding event to produce new projects.

With that said, there are many different forms of hacking. Particularly where it involves security. However, it is best to remember that hacking and security are two separate functions that have some common ground. With that said, there are a few different common security hacking classifications. 
These include Black hat, White hat, Grey Hat,  Hacktivist and many more. (http://en.wikipedia.org/wiki/Hacker_(computer_security)). The most common public interpretation of hackers are black hat's. Black hats are hackers that disrupt computer security for personal gain at the expense of another. The hacking community has a group that counter acts Black hats. These hackers are referred to white hat's. Hence WhiteHat security's name(https://www.whitehatsec.com/).

The motivations of each hacker and why they do what they do is complex. It can be as simple as for personal financial gains, to respect and cleverness , to being an activist trying to prove a point(Hacktivist). (http://en.wikipedia.org/wiki/Hacktivism). Hacking can be a fun and interesting activity, however it has consequence. Whether it is simply playful hacking, for example going to a hackathon and building a neat app and using resources that fall inline with the hack, to hacking a military base. All hacks require the hacker to tonight about potential consequences. Hacking a military base has some very obvious merits and consequences, but the consequences and merits of hacking at a hackathon are not always obvious. For example, if you end up building a hack that you wish to make money off using a library at the hack, who owns the hack and what roll does money play?

Sources / Additional Reading:

Friday, October 11, 2013

Open Source: Pro's Con's and the in between



Open source is the sharing of source files. What this means is that if you compile the source or interpret the source you should be able to predict what is going to happen. With that said,  it is not always true.
Also there are many problems that arise between proprietary systems and open source systems. Knowing the strengths and weaknesses of both are key to being a good developer or at least understanding what you are talking about. 

These topics range from security, data retention, what you see is what you get (WYSIWYG). One of the great things that open source provides is that it allows for many different people to look at your code. This helps finding new bugs, optimizing algorithms, developing awareness about your project, and allowing people to understand what your project does. 

Some of the pro's of a proprietary system is that it easier to make money or a business model off of it. Additionally you do not have to worry about competition taking code, modifying it, and selling it. You can sell binaries without as a contractor such that if there is a problem with the code they have to either reverse engineer the code or rehire you.

Looking at the grey, there are controversial topics, assumptions, and many other things to consider about what goes on between the two. With open source projects, most of the time people are encouraged to expand upon the project. Usually a group or person oversee's new code that is submitted and incorporated it into the project. However, code does not always do what it appears to do. Additionally it takes a lot of work to look over code, decide of it works and is useful. A great example of this is the IOCCC(http://www.ioccc.org/). With proprietary systems, users and sometimes developers do not know where or what is happening to the data they are submitting. Additionally, you can not change proprietary software. The closest thing you can do is to use API's and try to add onto the project.

Opensource generally lags behind proprietary solutions. This is typically because there is a lot more money in proprietary software. Also opensource projects are often very diverse while proprietary solutions are more narrow.


Some very liberal thoughts on opensource, and why it matters:

Friday, October 4, 2013

Agile: Why, When, and Where

Programming development cycles are an interesting topic. When considering which development pattern is best for a given project. Things to consider include but are not limited to development time, the size of the development team, the duration of the project, the need for updates, and the amount of communication with the end user/manger.

Agile is a fast paced development cycle that has originated from software development/Programming. It originated because of the fast pace style of programming, the push for rapid deployment and the various difference between building a physical and digital product. I'd say the founding of Agile development came from web development where rapid deployment is often emphasized over optimization. The severity 

A few things to note about Agile development is that it is NOT always the best choice. Generally you want to mix and match different development processes and expect for things to change that out of your control.

For a large company I would recommend the spiral or waterfall method. I believe it works better because the hierarchical structure of companies allows for it to delegate tasks and it has much more trouble pivoting with something like the Agile approach. The agile approach is designed to allow change and for rapid deployment. For a large company rapid deployment is not as much an incentive as is having efficient well tested code.

In the end, methodologies and patterns are applicable but should not be strict. In business as well as programming and engineering, the need for flexibility and approximation is key. Agile is nice because it expects things are going to change, however I wouldn't design my database or an operating system using a agile design.

Links: