Hacking Linux

My special interest is computers. Let's talk geek here.
User avatar
yogi
Posts: 9978
Joined: 14 Feb 2015, 21:49

Re: Hacking Linux

Post by yogi »

The guys that always amazed me were the ones using low level languages. Those peek and poke commands in BASIC were actually functions that operate directly on the CPU. Somebody had to write that function in order to include it in the instruction set. At Motorola U I took a class in TCL Tk programming language. It was basically a way to make GUI's for the other software that we wrote in C++. As it happened the class was way over my head. Part of the problem was the teacher was imported directly from Scotland. I could hardly understand him.. TCL Tk was loaded into a Unix system for us to do the exercises. One task was to take a Unix command of our choice and modify its look and feel using TCL. That's when it became very obvious to me that Unix (Linux) is just a package of functions that can be transported to just about any OS. When you read the man pages and see the dozens of options that you can use with a given command, you know that the person who wrote that was speaking directly to a CPU.

HTML is not programming. There are a ton of rules and tags which I suppose could be likened to programming functions, but HTML is only markup or formatting-centric. CSS is an extension of that. HTML talks to browsers while programming talks to microprocessors. I know of what you speak regarding HTML5. I looked into it about the same time you did and never went back. It was kind of fuzzy to me back then and is even worse now that it is more mature and developed. It may have made page rendering easier but it did nothing to simplify the language. I may not have forgotten as much as you did, but that's only because I never learned as much as you did. :lol:
User avatar
Kellemora
Guardian Angel
Guardian Angel
Posts: 7494
Joined: 16 Feb 2015, 17:54

Re: Hacking Linux

Post by Kellemora »

I have a friend who was running several websites, but most of the those were using host supplied platforms.
Then she switched to another host who had their own type of platform, so had to learn that platform.
She switched to WordPress for a short time, at first she raved about it, but had never hit any of the problems I told her about for a couple of months, then nearly every problem I told her about reared it's ugly head. So she abandoned WordPress complete and went back to the very first host she was using, even though it was quite expensive.

If I told her once, I've told her a dozen times to learn HTML, it's not that hard.
I looked at one of the platforms she was using, because she made me an administrator of one of her websites.
I merely looked at what it took to add the type of data and images she added. And although it did make some things easier due to tools they provided, it took me forever and a day to figure out how to do some of the things which should have been simple.

But that bad part about it is, their platform only works on their system, and only with the version number.
I remembered her complaining about them moving from version 2.xxx up to version 3.000 and how bad it was.
She like how version 2.xxx worked, but didn't understand version 3.000 at all. Totally different.
Now she raves about version 3.000, hi hi.

It took me close to a day to figure out how to do a whole page for her, but after I figured it out, I could make a new page every two hours or so, so did manage to help her get some of the pages back up and running again.

The sad thing is, if I could have done it using HTML, once I had the first page done, it would have just been a matter of copying the page, changing the image, changing the text, and uploading it from my computer to a new page.
Then it would only take perhaps 15 minutes per page or less to do.
Also, if it was in HTML it could be moved to any host with ease.

Now if I was a real go getter, and had the time to learn, php would probably be the best way to go for doing websites.
User avatar
yogi
Posts: 9978
Joined: 14 Feb 2015, 21:49

Re: Hacking Linux

Post by yogi »

Website hosting is one of those industries that is ultra competitive. I'm sure some companies go to great lengths to reinvent HTML just so that your site is not portable and must remain with them. That's some of the problem I have with frameworks such as Bootstrap. It's their way or the highway.

HTML is pretty stupid when it comes right down to it. It's not a whole lot fancier than what you can do editing these messages. LOL In order to overcome some of the shortcomings of markup language, people embed scripts that may be php, java, flash, or the gods only know what. It is the scripting that has the smarts for multimedia presentations. Add to that the inability of people to layout a web page unassisted. That's where things like WordPress come in handy. You don't need to know what drives it to come up with something acceptable. But, as you point out, it's only acceptable until you need to make changes.

You would have to learn more than php in order to use it effectively on a web site. There are databases and SQL behind most of what you see on the Internet these days. Perhaps the industry that is even more brutal than web hosting is webmastering. Creating web sites is not as simple as what you have experienced up to this point, and everybody is doing it. However, if you do learn enough to be good at it, you will be walking on Easy Street for the remainder of your days.
User avatar
Kellemora
Guardian Angel
Guardian Angel
Posts: 7494
Joined: 16 Feb 2015, 17:54

Re: Hacking Linux

Post by Kellemora »

I don't have log-ins or databases associated with my websites.
No places for folks to enter information. It basically just serves up the page they request.

The gal I talked about had book cover images that would appear at the top of her page that would change every five seconds. Just playing around with HTML5 and Bootstrap, I figured out how to do this easily enough.
And also how to add new pictures or remove old without having to rewrite the code.
A folder that held the images for the box was made like a continuous loop, so it didn't matter how many images were in the folder. And each image could be clickable to take you to the page where that books data is contained.
I don't remember right now how I did it, but it wasn't hard to do.

The section that held our Family Newsletters, while it was done in XHTML was password protected.
If you went to my Comcast website while it was up, and clicked on the little star at the bottom of list of links, it would open up a new list of protected items where Family Newsletters were contained. If you clicked on Family Newsletters, you would be prompted to enter a password in a box I provided. If the password matched what I had coded in, then the file would open. I didn't need a database to do this. But for the life of me, I don't remember the trick I did to make it work. So when I converted to HTML5, even though I had my old XHTML pages to look at, I couldn't figure out how I did it.
I think what I did was look for a particular keystroke, not a mouse click, for each letter.
I know I did not use Javascript, nor a Table, but to do it in HTML5 I would need JavaScript.
In looking at my code again briefly I see I used "onkeydown" with a message this don't work for all keys, use "onkeypress" instead. But each instance send it to another page and back again. I must have really done it a crazy way, and it does not work on HTML5 at all. This is why you don't need a password to get to my Family Newsletters files anymore, hi hi.
User avatar
yogi
Posts: 9978
Joined: 14 Feb 2015, 21:49

Re: Hacking Linux

Post by yogi »

There are gazillions of ways to make web pages, and you don't need to be very sophisticated to make a classy looking one. It all depends on your audience's needs and your capabilities. The php I used on the work servers generated the HTML. If you looked at the coding of any given page all you would see is a few lines of php, and the necessary HTML structure. All the content was generated by php and not hard coded. I suppose you could use folders instead of a database, but we were into security. We didn't want anybody to be able simply go to a folder on the server and dump the contents. Passwords were generally handled by cgi scripts and, of course, were all encrypted. There are a bunch of HTML "form" tags that you could use to enter credentials if that was necessary. It's been so long since I created a web page from scratch. I'm not sure I could do it from memory anymore. God bless whoever invented copy-and-paste.
User avatar
Kellemora
Guardian Angel
Guardian Angel
Posts: 7494
Joined: 16 Feb 2015, 17:54

Re: Hacking Linux

Post by Kellemora »

One of the ladies in our book club creates some amazing web pages, and I know she doesn't know php or much of anything else. She doesn't use any type of helper program other than a text editor for html, she told me what it was once and I looked at it, it was basically a text editing program with a couple of extra windows. To me it would be harder to use than a plain old text editor like Gedit.
The reason I brought her up is she did tell me how she can do so many new websites so fast. Your comment about copy and paste is what made me remember her.
Although she doesn't use templates, she does have numerous pages she's written and has saved modules so to speak from each of those pages into her note book.
So all she has to do is copy and paste a block of code for what she needs, and then edit to make it fit and work.

I sorta do the same thing. I have my base page in place with the basic layout, and a few lines of code for certain areas of the page, but commented out so they don't run. She will remove them if she don't need them for a particular page.

Ever since they came out with CSS, you can't really just look at the code for a web page anymore and figure out how they did something. Unless you are lucky enough to see they used W3.css or Bootstrap.
But as you pointed out, almost all professional websites are constructed by a php program so they are not help in learning.

I just mentioned W3.css, and am thinking of perhaps using it instead of Bootstrap should I try to do another page totally from scratch. They have a lot of modules in their css that Bootstrap don't have, and it is not as bloated either.
User avatar
yogi
Posts: 9978
Joined: 14 Feb 2015, 21:49

Re: Hacking Linux

Post by yogi »

I'd guess professionals do what your friend does intuitively. Creating a website from scratch each time is highly inefficient when you have dozens of clients to work with. Using readily available modules to perform a task is the idea behind frameworks like WordPress and Bootstrap. You still need to know the fundamentals of what works with what, but assembling modules is a heck of a lot easier than writing line by line from scratch.

I use a text editor called EditPlus. There are various formats to select from depending on what language you are using. The keywords for the basic web page are already in place in the HTML mode, for example. That editor can be split view too. It has an built in FTP function so that you can browse the server while eyeballing your HTML in another window. Seems like there was another possible window for looking at the results of running scripts. I don't recall if it had an internal browser. Even if it did you would want to view your work on the real world applications, but while developing a concept it might be good to see what it looks like as you write the code. Anyway, there are several such text editors designed to help write code. All Gedit does is give you a space for typing text. Sometimes you need a little more.
User avatar
Kellemora
Guardian Angel
Guardian Angel
Posts: 7494
Joined: 16 Feb 2015, 17:54

Re: Hacking Linux

Post by Kellemora »

I think it was called the BlueFish Editor I used a long time ago.
But most of my work after getting the HTML5 websites done was just editing to add a new page or update existing pages, so Gedit was fine for that.

Every time I've tried reusing lines of code I used on other pages, I end up with having the wrong number of DIVs or something. Or something left open somewhere that needed closed. The results do strange things when you miss something, hi hi.
User avatar
yogi
Posts: 9978
Joined: 14 Feb 2015, 21:49

Re: Hacking Linux

Post by yogi »

It's amazing what a missing semi-colon or a missing bracket can do to the appearance of a web page. That's the advantage of using editors designed to work in a specific language, or HTML. The editor will open and close brackets automatically. If something is missing it's usually obvious from the code layout being askew. They don't catch everything but troubleshooting is easier if you have the right editor.

One of the most horrendous web page codings I've ever seen was that which is produced by MS Word. Don't know what it does today in 2019, but back about 20 years ago you could use Word to make web pages. It did a fairly decent job too if all you were interested in was the end product. The coding was a nightmare. All of the formatting was inline. CSS was unknown back then. Spaces and white space were created in ways you could not imagine would work. But, because it was all inline it worked quite well. You could not read the content easily, but then you weren't supposed to look at the underlying code.

I still shiver thinking about it. :mrgreen:
User avatar
Kellemora
Guardian Angel
Guardian Angel
Posts: 7494
Joined: 16 Feb 2015, 17:54

Re: Hacking Linux

Post by Kellemora »

Honestly - How I learned what was needed on a web page was through the use of Open Office Writer and converting it to HTML. They didn't have all the extraneous code msWord added, so was easier to clean up.
Then of course, by looking at other peoples websites, I learned a great deal more.
I think I did a fairly good job of writing my own web pages from what I learned, at least they worked, looked good, and had the least amount of lines of code and keep it working.
It wasn't until I was well into using XHTML/CSS that I learned how to make my notated copy to work on, and then make a condensed copy of it with no wasted code. This was supposed to make the website run much faster, and it did. And after I condensed all the images, it ran light lightning.
I don't think I've condensed my HTML5 pages, since almost everything is done using Bootstrap.css
I have so many backups and changed computers a few times, I'm not even sure which is the version I have uploaded anymore, but I'm going to have to figure that out soon, as I have things I need to change or upgrade.

If I recall, Gedit tells me if I'm missing something. But as I said, been a few years since I touched my web pages.
User avatar
yogi
Posts: 9978
Joined: 14 Feb 2015, 21:49

Re: Hacking Linux

Post by yogi »

My only experience with Gedit is to look at flat files and edit config files. I never tried to write anything serious using it and don't know what it's full potential is. EditPlus is pretty sophisticated in the sense that it uses color coding for keywords and automatically indents code to make it easier to read. No reason other editors could not do the same thing.

Your web pages do indeed work very well. I might have laid them out differently but that doesn't mean it could be better. Everybody has their own style. Since you formatted the layout yourself it should not be a big problem recalling what you did and why.
User avatar
Kellemora
Guardian Angel
Guardian Angel
Posts: 7494
Joined: 16 Feb 2015, 17:54

Re: Hacking Linux

Post by Kellemora »

Gedit does have a highlight mode which shows different html lines in different colors.
It has been quite a while since I used it, so I don't remember exactly what and how it highlights off hand.
I didn't see that it did anything any differently than BlueFish, only without all the extra windows on the screen.

My website is basically identical to the original HTML when I first wrote it, other than adding the new style buttons, and making it mobile friendly. When I switched from XHTML/CSS to HTML5 I had to do a couple of things differently, but overall, the layout is still the same.

I did try what they call the cell-phone look where the buttons were scattered all over the screen. I didn't like that at all.
And using a graphical map does not work well on all devices, so after a couple of attempts, I canned that idea too.
So, what's up looks just about the way it always has.

Some folks like the little useless left margin on secondary pages, others think it's neat, hi hi.
But everybody likes my jump back buttons that take them to the top, and the breadcrumbs at the top.
It's just a shame when I was on Comcast I had to delete so many of my pages, because personal website space was limited.
Although I did have backups of those pages, they were not redundant like other data. So the lightning strike, and/or the ransomware attack we suffered, killed a lot of the backups on the local connected external HDs.

I'm sure once I get back into it again, I will know why I did something the way I did.
But at the same time, I'm also considering using W3CSS instead of BootStrapCSS.
User avatar
yogi
Posts: 9978
Joined: 14 Feb 2015, 21:49

Re: Hacking Linux

Post by yogi »

I"m pretty sure Bootstrap framework uses W3C standards. I would not be as popular as it is if it varied too much from the norm. A lot of the websites I see today take a standard three panel approach that lends itself to scaling on all devices. It's kind of boring in a way given that the only variation is the content in the center panel. On the positive side it's easy to navigate and you know where to look for things. It would seem easy to maintain as well, but since I've not attempted anything like that lately I don't know the details.

It's truly amazing that your original website works well in today's HTML5 world. That's a tribute to the browsers more than anything else. They take up a huge chunk of memory and CPU cycles and must be backward compatible all the way to the Netscape days.
User avatar
Kellemora
Guardian Angel
Guardian Angel
Posts: 7494
Joined: 16 Feb 2015, 17:54

Re: Hacking Linux

Post by Kellemora »

Oh no Yogi, I completely wrote my website from XHTML/CSS to HTML5 using Bootstrap.
What I meant was I kept the layout as close to original as possible using the new CSS features.
Yes Bootstrap uses W3C standards, but it is getting overly bloated.
I know I can cut out just what I use, but it appears W3Ccss is lightweight and fast, and still has a lot of the most used options.
User avatar
yogi
Posts: 9978
Joined: 14 Feb 2015, 21:49

Re: Hacking Linux

Post by yogi »

I have a book (now replaced by Google) with a list of CSS and HTML tags and explanations for how to use them. Like man pages in Linux, I suppose, it is very sterile and not always helpful. That's it for resources. I have not relied on anybody's pre-assembled framework. All I have at my disposal is the basic tools and my creativity. It takes me a lot longer to make a web page that way, but when it's done I know exactly why it is the way it is.
User avatar
Kellemora
Guardian Angel
Guardian Angel
Posts: 7494
Joined: 16 Feb 2015, 17:54

Re: Hacking Linux

Post by Kellemora »

I used the Tizag and W3C School websites to learn how to write my own websites, including my first CSS file.
It was only after I updated to HTML5 did I start using BootstrapCSS, and that was basically to make my website mobile friendly.

I have a very hard time trying to understand MAN pages, or just lists of what each Tag does, without examples of how to use them. Many of the Tags say they will do this or that, but they don't unless they are used with something else and only in a certain way, and this is not shown on List pages.
Even on W3C where they have the boxes where you can TEST the command, it will work in the test box of course, but may not work on your HTML page, because some pre-requisite is missing.

But I do agree with doing it all yourself, and not relying on templates or provided forms, then you get what you really wanted without problems when something on the templates or forms is changed by the developer.
User avatar
yogi
Posts: 9978
Joined: 14 Feb 2015, 21:49

Re: Hacking Linux

Post by yogi »

The only issue I have with homebrew websites is that I DO get what I want. But, there is so much more and an infinite number of variations I do not know about. Reading the man pages would tell me what's out there, but it doesn't inspire me to be creative and use it. That's not the purpose of man pages. You go to the manual only after you know the command but don't know how to use it the right way. Reading the manual to find new commands would cause my brain to melt. LOL
User avatar
Kellemora
Guardian Angel
Guardian Angel
Posts: 7494
Joined: 16 Feb 2015, 17:54

Re: Hacking Linux

Post by Kellemora »

Tell me about it Yogi, my brain fried a long time ago, when I first started trying to understand MAN pages, hi hi.
Thank goodness some folks write instruction manuals, even though most of them are still over my head.
I don't remember how much money I wasted on programming manuals to learn to program my little first computers.
Post Reply