Is Open Source Code Truly Beneficial Despite Its Accessibility?

  • Thread starter Thread starter Tenshou
  • Start date Start date
  • Tags Tags
    Source Writing
AI Thread Summary
The discussion centers around the legality and practice of viewing and writing source code from websites, particularly focusing on languages like JavaScript, C#, and PHP. Participants express that examining source code is common and generally permissible, as HTML and JavaScript are accessible to users through browsers. Concerns about legality stem from recent laws, but it is clarified that looking at source code does not violate freedom of information laws. The conversation highlights the importance of understanding code cleanliness and attention to detail, which reflects on the programmers' skills. While JavaScript is visible and can be deciphered, its purpose is to enhance interactivity on websites rather than to remain hidden. The visibility of code fosters learning and innovation, although it raises concerns about code theft. The discussion also touches on the prevalence of open-source software, emphasizing that many developers share their code with certain restrictions, allowing others to build upon it. Overall, the forum emphasizes the value of source code exploration for improving programming skills and understanding web development.
Tenshou
Messages
153
Reaction score
1
Do any of you look at source codes from websites, do you write source codes?
 
Technology news on Phys.org
Tenshou said:
Do any of you look at source codes from websites, do you write source codes?
That's a very silly question to ask in a forum section that is devoted to programming and computer science.

Speaking for myself, I spend a good part of my workdays looking at and writing source code (not source codes) in a number of languages, but primarily C#, JavaScript, and jQuery these days.

What's your point in asking?
 
I am just wondering it is illegal to look at websites source codes, like is there some type of freedom of information law I am violating >.< . Although I do have a hard time reading it I think the ability in reading it is getting better the more I do it.
 
Looking is definitely OK.
 
Cool. :) I have just been so paranoid since all of these strange laws have been passed by the U.S congress.
 
Do you mean the HTML/Javascript code? Your browser does this anyway.
PHP code? Normally, you should not have access to this (unless the site made it public or you manage that site in some way).
 
I guess it is javascript code, I just open up the source code tablet and start trying to analyze the code .
 
I look at source code all the time. That's how I know what parts of sites I want to block. I also find it interesting to see how clean code is from one site to another. Attention to detail says a lot about the programmers.
 
Last edited:
Look for copyright or reverse-engineering restrictions if you intend to reuse somebody else's code.
 
  • #10
Borg said:
I look at source code all the time. That's how I know what parts of sites I want to block. I also find it interesting to see how clean code is from one site to another. Attention to detail says a lot about the programmers.

I do agree! Although I am still an amateur in coding I do wish to be come better can you guys give me some tips on becoming a better programmer?
 
  • #11
The fact is, Javascript source code cannot be hidden from end users. It can be obfuscated and compressed, but with patience, an end user could always decipher it in the end.

This is one reason why server-side languages may sometimes be used for computations instead of Javascript.
 
  • #12
so what good is it then if it can be deciphered?
 
  • #13
The purpose of JavaScript is not to do something in secret. JavaScript helps to create active elements in websites, it can calculate things for you and so on.
Database access and similar things must be done somewhere else (like php scripts, for example).

It can be an issue that you can steal code, and re-use it on other sites.
 
  • #14
The visibility of Javascript code to end users is why, these days, few games are developed and distributed using Javascript, although technically, it is a decent platform for games. Instead, web-based games (at least for some years) were developed using Java applets or flash or other technologies instead, because the code was harder for end users to get at.
 
  • #15
In many ways, the visibility of Javascript code is good, because, as noted above, people were able to see how others did things, like image rollovers, and then go and do them on their own sites. Nowadays, production environments will use a library such as jQuery instead of raw Javascript, because the library will take care of ensuring that browser differences are compensated for. jQuery is the most popular, and for anything other than very minor web page tweaking, a Javascript library should be used.
 
  • #16
Tenshou said:
so what good is it then if it can be deciphered?

Most of the web now is open source. People give their code away with some restrictions, as it allows others to build on top of it.

This forum is vbulletin (source code available) which is written in php (source code available) and hosted on Linux servers (source code available). I don't know what the license for vbulletin is (I think it's proprietary in that you get the code but can't redistribute it), but php and linux are both fully open source: you may modify the source code to use in your own projects and redistribute those projects.
 

Similar threads

Replies
39
Views
305
Replies
1
Views
2K
Replies
2
Views
1K
Replies
0
Views
2K
Replies
1
Views
903
Replies
10
Views
3K
Back
Top