I found this great little tool (and again later to be given to me by code-project!), that let's you do some pretty fancy looking diagramming (aka mind maps). It's called cayra and I definitely recommend everyone checking this one out, it's a good find and definitely good for laying out program flow in a snazzy way.
Just to let everyone know, I've blocked all the people in the programming neighborhood that were obvious fakes. I recommend everyone do the same, and for all the new entries.
A note: If you're not contributing to our discussions in the neighborhood and are only bothering to spam us with your useless drivel, just leave. I don't want to read it and I guarantee the company just paid either someone or a company to do this (probably using some sort of bot-like system).
It just aggravates me, sorry.
This is in response to jcoehoorn's post about Stored Procedures in SQL
I think there needs to be a major overhaul to the SQL language (even a new Database engine if need be). I mean, we are the main users of database servers. Sure, there may be a few uses outside of the programmer model, but not very many. I know that SQL Server is implementing something like this, and I know some languages incorporate this into themselves but what I want is the database servers to implement a language that sticks to the general nature of a programming language (especially data types). As a whole, there is a huge deviation from database and programming languages.
What I want:
Namespaces - there needs to be a logical way to order tables other than tied directly to a database. Sure, alphabetical is fine but as jcoehoorn points out, that's not always logical, and it sometimes (if not always in larger databases) is a huge mess.
Object Oriented Design - yes, I want a clear indication of types and objects here. No more confusion around "Can I return a table of elements or do I have to return the whole table and do that programatically." I also want to eliminate the confusion that arises between data types programmatic-ally and in the database itself. Something like:
- Union of Primary Data Types (int, string, char, char[], ... -- I want this to replace the text,varchar, and char fields, etc)
- I want to be able to return Tables, I want to be able to create tables with select statements and return them I don't want anymore result sets or things like this. It adds to the confusion when trying to tie directly to the database and would eliminate the need to always stick with a data type.
An example of the syntax might be something like this:
using MyDatabase.UserInformationTables {
new Table Users {
int userID(unique, autogenerate([random,increment]));
string userName(unique, not null);
string userPass(not null);
char[8] userDivision(not null,default(00000000));
};
}
Maybe something like this. I'm not sure if I'd want to change querying syntax directly, but it's just a rough idea. Sort of a "programmers" database and a derivative from SQL -- which wasn't really created with programmers/programming in mind.
Note: I want database servers to be able to support this through a standard medium. That way the programming language/package can support it without adding even more mess when dealing with how to connect to the database server.
As I entered the real world of application development, I realized that my schooling was very inadequate. Granted, I've been doing this forever and I already possessed knowledge in programming so I already knew most of the things that were asked of me. However some things are still a little confusing.
Sockets
My biggest gripe is the lack of socket experience, from TCP to UDP to whatever other protocol you've implemented. No school I've seen teaches this. All of my friends from various other IT programs in various other schools have come out any further ahead in this area. It's very surprising especially with the scale of Networks and the Internet in the present day. I think in ITT we touch upon a very simple client/server application for about a quarter of a lecture (and it was only because the teacher got the choice to pick something for that period).
File I/O
This was completely overlooked as well. I think the more advanced students were allowed to use File I/O in C++ simply because we were ahead (it was never touch upon by the lectures at all, in any of my classes). There needs to be more topics discussed on how to read and write information to files in all sorts of methods (binary, streams, whatever). You can't relay on Database driven applications to store/retrieve information all the time. Thankfully C# made this easier, but students need to learn the fundamentals on iteration of characters and data with File I/O too.
Not everything starts fresh from runtime. In fact most things don't. User input from the console is fine in labs, but hardly practical in real life.
Regular Expressions
These are the holy grail for textual comparisons. I don't have to reinvent the lexical wheel every time I want to try and match a pattern. These should be touched on more frequently.
GUI / Graphics programming
I would've liked a very brief primer to GUI development. Something where I don't always have to relay on a GUI to develop GUIs. Also maybe a breif introduction to OpenGL or even DirectX would've been great too. There's nothing more fun on a school project than trying to implement your own GUI-like system.
That's just a little of what I was looking to expand upon in school. Unfortunately I had to pick up books to expand my knowledge (which I'm glad I did because they've been very helpful!). Please, teach the future programmers these things!
Today I got fed up with the complexity needed to process an external app.config file. This got to the point where it was becoming too clumsy to read and program with and completely defeats the purpose of OOP (simplicity!).
That being said, I devised my own. Now, it's not nearly as complex as the original one and some things are missing (I didn't need them yet) so I've left them out.
Go ahead if you want to use this, all I ask is you give me credit somewhere. That's not too much to ask.
Link : System.Configuration.Extended [ExtendedConfigurationManager]
A little howto on how to use it:
By default, this will load your application's usual default app.config (ExecutableName.exe.config), unless otherwise specified. If you wanted to load an external app.config file for whatever the reason may be, you need to specify the filename first with the property:
System.Configuration.Extended.ExtendedConfigurationManager.ConfigurationFile = "./theNewFile.config";
After this, you should be able to use:
System.Configuration.Extended.ExtendedConfigurationManager.AppSettings["Foo"];
This will retrieve the value from the <add key="Foo" ... /> in your AppSettings section in the config file.
Note, if the configuration file is update, it's reflected immediately in the next call (each call to AppSettings[] will refresh the list). So be weary, it's not cached and could be IO intensive every attempt at reading. I may change that in the future.
CURRENT VERSION : 0.0.1.3
Let me know what you think.
I was scouring the net and stumbled upon this little crown jewel. Cosmos, ironically about 20 seconds after I found it it was in my codeproject newsletter.
It's a .NET based package that allows you to build your own operating system without needing to get into the nitty/gritty of kernel development and needing to use C++.
I see some big potential in this project, I hope they add more. I also hope some open source teams get interest in this project and begin helping to develop modules for it. I'm excited about it.
While performing some complex regular expression set ups today I decided it was a good idea to search for a tool to help me implement the complex ones I'm working on. Lo and behold, I found a pretty nifty one.
It's neat, definitely does all I needed it to do. Take a look-see and have fun.
For those of you who like good ol' web applications, I recommend this one.
I just received this link in one of my codeproject newsletters. I glanced over it, mind you, I didn't read too deeply into it. To me it just seems like a fad that isn't going to gain much ground. From what I've read, it just overly complicates the method to program, or just creates a more "non-logical" approach to it.
I may be wrong, but I don't think this is going to take off. The only way it'll gain ground is from people new to programming, perhaps to simplify the kind of mindset it takes to be in this field.
I think we need a more defined tool set for object-oriented programming rather than a whole different way to think. Someone needs to actually expand C++ to be more than just "C with classes." And get down to a more object-esque approach to design and programming (make it part of the ansi/iso standard for the language -- and the compilers should require it).
I would love to have a language similar to C# that could compile natively. Something more C than Java. Something that takes the mess out of object oriented approach. I also want more native toolkits since we're no longer in the days of consoles. C# with .NET got this right, and I'd like to see C++ enhanced this way too. I want threading, sockets, GUI tools. Cross-platform so I don't need to rewrite my code or have thousands of #ifdef __WIN32__ macros all over. I heard C++ is getting a revision for threading, I think it's too little too late -- and usually the STL toolset is hideous enough to make me write me own or use 3rd party ones.
How's everyone feel about something like this? It might be worth while to get a project together someday.
At my current place of employment we have a database server that is running Microsoft SQL Server 2005. Now, the problem has arisen where I've needed to connect to this machine on an Web application from a GNU/Linux box with PHP. I'm going to walk everyone through what I've had to do to get it working.
This solution worked for my Ubuntu box, thank goodness for apt-get (although any competent Linux person should be able to get where they need to go with compiling from source). Again, I'm actually compiling Apache and PHP from source. It's better that way. Now, bare with me, I've done this ahead of time and am just recapping what I've done to try and help others.
Prerequisite step:
Make sure your distribution and tools are up to date. A simple command for this in Ubuntu was:
sudo apt-get install build-essential
some resources I've seen recommend:
sudo apt-get install build-essential flex libncurses5-dev libxml2-dev
First, you obviously need to set up Apache.
Get the source here:
http://www.apache.org/dist/httpd/
Extract it in your usual fashion. Mine was:
tar -zxvf http-2.2.6.tar.gz
CD into the directory and then run:
./configure --enable-so --enable-modules=most
make
sudo make install
at this point you can test the install, but for your information my Apache installed into /usr/local/apache2/
sudo /usr/local/apache2/bin/apachectl start
sudo /usr/local/apache2/bin/apachectl stop
Now when you visit 127.0.0.1 it should show something like "It works" (if it worked!). Congratulations, you've successfully set up an Apache web server.
Second, it's time to install PHP (and add MSSQL support!)
In order for PHP to set up MSSQL support successfully, you'll need FreeTDS (or a similar sybase-esque connector, so I've heard). Contrary to popular belief, you don't need to mess around with ODBC at all.
For me, on Ubuntu 7.10 all I had to do was run:
sudo apt-get install freetds-dev
For others, you'll need to compile this from source most likely:
http://www.freetds.org/software.html
You're on your own for that one, although I'd suspect it's not too much different from any other compilation procedure.
Get PHP's source, here:
http://www.php.net/downloads.php
Again, extract the source:
tar -zxvf php-5.2.5.tar.gz
CD into the directory and run the configuration:
./configure \
--with-apxs2=/usr/local/apache2/bin/apxs \
--disable-debug \
--enable-inline-optimization \
--enable-magic-quotes \
--enable-wddx=shared \
--enable-xml \
--with-gd \
--with-zlib-dir=/usr/lib \
--with-mssql
make
sudo make install
Once this is done, you'll need to copy the php.ini to the proper location.
sudo cp php.ini-dist /usr/local/lib/php.ini
Now you'll want to edit your httpd.conf file to reflect that you've installed php.
Open the file /usr/local/bin/apache2/conf/httpd.conf in your favorite text editor
(mine is pico, I can't stand vi)
Find the respective lines that say something like LoadModule in the conf file and add the following:
LoadModule php5_module modules/libphp5.so
You'll also want to find in the conf file where the lines AddType are located, modify them to contain:
AddType application/x-httpd-php .php
Once you've done this you'll want to go ahead and edit your php.ini (/usr/local/lib/php.ini) and uncomment the line that says (which I don't know why):
extension=php_mssql.dll
Once you've done this, go ahead and do:
sudo /usr/local/apache2/bin/apachectl restart
And with any luck, you'll be all set for your apache-php-MSSQL and Linux adventures!
Good luck and let me know how it went!
Resources:
Some resources I've used in the past to do this sort of thing:
http://www.php.net/manual/en/install.unix.php
http://eightpence.com/running-multi-threaded-apache-with-php-on-ubuntu/
http://narnia.cs.ttu.edu/drupal/node/100
http://panthar.org/2006/06/15/php-with-mssql-on-ubuntu-606/
Each one will teach you different things, I've used pretty much all of them at one point or another
on MSSQL support with PHP in GNU/Linux