Forum Replies Created

Adan Member

PHP updates from x.n to x.n+2 can break many things:
Check the changelog of 5.3 and 5.4 and check if the scripts are compatible. You can also read PHP logs.

At first sight it doesn’t seem to have problems.

Adan Member

If you have to write conditional code to determine whether the session is started or not, there is a design flaw in the application. “Housekeeping” things like setting the error reporting, starting the session, and connecting to the database should always be done unconditionally at the logical top of the application. Often these things are factored out of inline code into a common script that gets brought in with a require_once statement. Then the PHP scripts that build the web pages start like this:


And in session.php we have something like this:


The session.php script is also a convenient place to store your class and function definitions if you're not using an autoloader.

Adan Member

But if you insist, all you need is a trivial loop, so just leave out the condition:

        for (int i = 0; i < list.Count - 1; i++)
	{
		Person person = new Person();
		person.Name = list[i];
		person.FavoriteColor = list[i + 1];
		personsList.Add(person);
	}
Adan Member

You should remember that not every programmer will need that low-level knowledge right away. If you just want to learn programming – almost any language will do. Go ahead and start with Python if you like it, you’ll have a boon of interactive interpreter. Want to maybe dabble with server-side stuff and hear that PHP is the way? Go ahead and start with PHP (it’s… not that awesome, but very popular and definitely usable). You think C# smells nice? Use that.

I don’t see why learning manual memory management (because that’s basically where it gets down to, pointers and manual memory management) is necessary for this, and if that’s what you want to push down beginner’s throat, then just throw C at them. Make them build their own string facility.

Honestly, it’s good to learn the low level stuff if only to be aware what the standard facilities of this or that language do behind the scenes, however, I’d risk saying it’s better, or at least – not worse – to do it after you get a grip with the whole concept of the computer running some very explicit, specific instructions, to solve some problem. I think at least for people that aren’t interested in low level stuff – it will obscure what is the most important, learning – generally understood – programming.

It’s fine if you want to start your programming journey with C or C++, the learning curve might be steeper, but you’ll make it just as well. However, that’s definitely not the only way to do it. I don’t see why Python or C# would not be a good choice for a starting language. At the beginning the language used isn’t all that important.

Adan Member

Firstly that is not even a question that is revolved around programming knowledge it doesn’t even use complex methods but rather very basic fundamentals in programming you could write that in python or c using probably only pointers , functions and variables , it doesn’t take streams, it doesn’t output to files , writing it as a class would be overkill.

that kind of programming question is more mathematical than anything else and really i cant be bothered to do the mathematics of it as i have actual work to do and don’t have time to fly around like you, even somebody who has never once touched a programming language could write that in pseudo code.

I really suspect that your the one who has no idea about programming since you posed that question and mentioned that it is used in a test.

Adan Member

i am not going to do that because i am busy with my own work and don’t have time to prove to you that i know how to program

If you study mathematics and you skip algebra, or calculus and you try to learn polynomials or trigonometry , YES it can be done, but it will be unnecessary difficult and stupid to approach it that way , you might not realize it but subconsciously you are employing the skills you developed in algebra and calculus to work with trigonometry and intuitively you are using or learning trigonometry etc and you can apply this to any other topic just remove the topics i mentioned and put x,y b and the sentence still makes sense

same thing with programming

you learn memory management which later on you don’t realize but intuitively you use what you learned during the time when you worked with memory management

its basically compounding knowledge , you cannot learn to run without walking first , or what will happen is that you wont realize it but you will be learning to walk while you are trying to run

THAT’S my point

and for your information my work is orientated on opengl ,c++, GLFW, box2d, android i am developing games at the moment so therefore memory management is very imperative to my work i.e buffers objects etc

Adan Member

A programmer must have a flexible mind ready to tackle the designing problems. If you are good at programming, you have the right mindset to interact and use the programming environment. Pointers and memory management are an aspect of programming and if you are a good programmer and you make the right questions and decisions you will use it in the right way even if you have not intensively studied them. At first you won’t be able to use tricks acquired with experience but you will still use them efficiently. 100 programming aspects don’t need 100 different mindsets. It’s, instead, the right approach used in different situations. Only the bad programmer would learn everything and use memory; the good programmer would do this:
I never used the pointers, so how can I proceed?

  • How do they work?
  • How can I use them?
  • How can I optimize my code?
  • Does my code have problems?

etc. etc.
By making the right questions you will develop a general understanding that will be useful for all the programming tasks. Everyday there is something new, knowing all of everything is impossible. It’s far better to know the general solution to everything: the mindset that gives you the tools to correctly solve a new problem. A programmer that knows only old solutions is far less valuable than someone who can invent.

Adan Member

your saying skip memory management etc and go straight to c# is just absurd, because the point is not about learning memory management but rather to get an intuitive feel of how programs work and run which you will later on use in your own programs

where is this person supposed to get the ideas of how to write programs? how can they get a feel for functions and methods etc and how to use them appropriately and resourcefully without understanding how memory management works?

because if you think that a person is supposed to just instantly develop thinking in OOP terms without any previous background in languages which deal with simpler concepts, you are greatly mistaken and would make a terrible advisor or teacher for anyone trying to get any advice on the subject of computer science

your not just dealing with programming languages your deal with with computer science principals and fundamentals

if this guy doesn’t understand what pointers are and how they work, he wont have the foundations to be able to utilize methods in their own programs , especially if they dont have an engineering background

Adan Member

I have a lot of doubts about your affirmation. You have more complex concepts to worry about, especially when c/c++ haven’t got garbage collector, this means that you have to destroy all your created objects, if you don’t, they will live up to the end of the program (The memory is not released). This means that C# or Java are in a higher abstract level than c/c++.

Apart of that, there isn’t a good IDE for c/c++ (you can’t compare Visual Studio + C# against anything using c/c++).

in my opinion, the order by difficulty would be java or c# (they are very similar) and then c/c++

Adan Member

You don’t need to keep yourself away from GUI programming but remember that understanding the programming logic is more important than mastering the GUI frameworks in the overall. You can do both in my opinion, just balance the learning to give more room to the programming concepts regarding the logic of software.

Adan Member

GUI coding, for the beginners, can be a source of confusion. GUI programming, especially for beginners, has the drawback of distracting you from the programming logic. Usually people, first start grasping the programming logic and only after this they jump on the language’s peculiarities. If you plan to program both console and graphical applications you won’t have problems and this would greatly aid you. Console applications let you focus more on the programming logic. I’m not like my colleagues that strictly forbid learners to do graphical programming the first times . I consider that programming too. The only problem I see is that it can be overwhelming at first, because you will have a lot of unanswered questions and you will use a lot of things without knowing how they work and why. If you plan getting serious about programming, you have to learn GUI programming too. Try to balance your learning. Focus especially on what you want to master and try to give enough room for other concepts: like database programming, GUI etc. etc.

C# is capable of writing graphical apps. Without using 3rd party tools/addons, GUI programming depends on the OS and the means it offers to create graphical applications. You adventure in a part of programming in which there are more rules and obligations than logic and this is one of the reason someone discourage to do GUI programming at first. One of the crucial abilities of programmers is the capacity to use what it’s offered and to be a programmer you must know how to do GUI programming. In my opinion you should try both type of programming.

Adan Member

C# code won’t run on Android with slightly modification. It will run only with a total rewriting in Java.
C# is a mature and a well designed language. As long as you will use your head in the right way, you can start with all the languages you want. Programming is about building the right mindset to understand and reshape a problem. Once you get the right mental tools, you can switch languages with easiness.
Video tutorial are not a good choice generally. Books and real programming will help you a lot more and C# is popular enough to have many good books.
In this link there are many free books.

https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md

Is not too important the language that you start with as long as you build the right thought pattern. C# is a language that can shape your thought in the right way. C will force you to think like a programmer more but if you are not stupid you can do it with C# too. In order to be a competent programmer you also need to know some things not found in C# like memory management and accomplish programming without extensive pre-made libraries. C will push you straight in this situation and this is one of the reasons it is generally suggested. C is also simpler in terms of language complexity and has a very limited library compared to C#, Java etc. etc.

To learn programming, choose a good book and once you have enough concepts to use immediately start to program. Don’t make the error of reading 2-3 books and then start to program because you will have forgotten the books if you won’t have applied what you read. Books are an helping hand to get you to program, the right way of doing it is to try the best as you can to apply what you read in real world situations.

Adan Member

I need to develop this on a machine where ASP.NET 3.5 SP1 is installed ? That’s the part I have been missing…

Adan Member

VS2008 is not sufficient. You need VS2008 SP1.

You can also use a later version of Visual Studio, because they can target the 3.5 framework through the project’s Properties window. This will require that framework 3.5 SP1 is installed on the development station however.

Adan Member

An AD property or an actual Exchange email address domain? (Where the domain is *.net)

If it’s the 2nd one, why would you need a CSV? you can simply spool through your entire list of users and use this PS script.

foreach($i in Get-Mailbox -ResultSize Unlimited) {
  $i.EmailAddresses |
    ?{$_.AddressString -like '*@yourdomain.net'} | %{
      Set-Mailbox $i -EmailAddresses @{remove=$_}
    }
}

This will remove entries that has *@yourdomain.net from all mailboxes while leaving all other email addresses intact, perfect for situations where a certain OU had two domain suffixes and one was decommissioned.

Viewing 15 posts - 46 through 60 (of 80 total)
en_USEnglish