Jump to content
LordJashin

web programming, and it's annoying sometimes

Recommended Posts

Like I'm trying to learn it, and there's so many Security/Accessibility/implementation details to deal withs.

 

Php, Mysql, Javascript, have so many things you have to be careful about. Especially php because it is the final defense against hackers and stuff. Accessibility is kinda annoying because there's lots of fall backs you could do, and implementing WAI-ARIA, or just simple stuff. Another thing is with implementation. There's a variety of ways to do stuff, and it's not always clear what to do exactly.

 

Like for instance in HTML/CSS. It's hard to center a navigation bar, because of implementation. And you end up having to using Display: on the li's. And that just goes back to the browser thing, and stuff. Too many things to watch out for sometimes. And Internet Explorer is the big gorrilla in the room.

 

Anyway. I'm glad Delphi, Java, C, and other languages, don't run into these problems too much :D.

 

 

Have a nice day. This is rant #1.

 

Let me also add. Oriellys Javascript the Definitive guide, is an excellent book.

Don't take my judgmentalness too seriously hehe.

 

 

And uh as far as HTML 5 goes. Just avoid it except for a couple things and the semantic elements. CSS3 though is awesome. Use it! Especially that box-radius. But have a fallback too.

Edited by LordJashin
Link to comment
Share on other sites

Alright finished the Javascript the Definitive Guide Book. And learned jquery too a bit woot from the book. But man, that was like 4 sets of element/node operations lol, 2 in javascript, 2 in jquery... so les go $().ajax woop

 

Onward to Programming Php book, I'm on like chapter 3. Much harder so far -_-.

 

my fave things about javascript: event bubbling (or propagation), closures, dynamic typing, short circuiting || & &&, uh XMLHttpRequest object. And prototypes for sure. It's good it doesn't have classes, saves me the trouble of learning em. However, classes can be "simulated". And asynchronous things too. Its good to know javascript for UI development. Like Jquery UI, and widgets, twitter bootstrap, all have some javascript you can use. or are built as jquery plugins or etc. JS is single threaded i think most of the time, but events and ajax is all handled asynchronously which is in another thread. So that's kewls.

Edited by LordJashin
Link to comment
Share on other sites

HTML/CSS. CSS is a bad boy. But it has been a fruitful learning experience.

 

CSS Advice:

*Use block level elements as much as possible. Don't use inline-block or float on everything. You shouldn't have to, most of the time, unless you want to align something flush left or right INSIDE a block element (e.g. float: left, float: right);

* Use margin-left: auto; margin-right: auto; To center Block level elements

* Reset EVERYTHING YOU NEED TO. That means Lists, Links, Headers, etc. Set their padding, margin, border to ZERO or w/e you want them to be.

* Use the MicroClearFix css class on The Parent elements of Floated elements:

.clearfix:before,
.clearfix:after {
   content: " ";
   display: table;
}

.clearfix:after {
   clear: both;
}

.clearfix {
   *zoom: 1; /* IE only reset's hasLayout */
}

* Use display: inline; for List items (li)

* Just rely on these properties: float, padding, margin, border, width;

* Don't use 100% width AND padding/border/ or margin. Be careful here. Could cause overflow or break boxes.

* Block elements can have their width set but it's always based on the parent element's width. E.g. width: 300px; That'll be 300px of the parent elements width. If its MORE than the parent's element width, it might break the box.

 

*Be careful, not everything is 100% browser compatible (Because of IE 6/7) and even older versions of some browsers*. Margin: auto for instance needs some work arounds. IE6, if you choose to support it, i think has a different Box model then the CSS standard one.

 

 

Forms:

 

Group the input elements carefully with Div's, and just group them somehow. And most of the time people want Input elements to line up, and the text that says what they are for. Use floating for the input elements, and float them to the right, so they all line up. Don't use guesstimation and try to line them up.

 

Mobile first, response web design, css3 w/ fallbacks, media queries, and etc. are awesome.

 

 

AND here's what i've been working on. Just started it today:

 

ajO5RU6.png

I'm gonna make all the links in the NavBar, that Blue color (my account for instance), because it looks better, especially on the active page's link.

 

----

 

If anyone wants to know. I'm making a website, and I want it to help people, and basically act as like a medium for self improvement, or reflection on one's self. Psychologically.

 

Initially I wanted it to be a weight loss website, but I figured I might as well expand it. My initial inspiration for this was because I know there's so many overweight people in America right now. And if they try to lose weight, it's total hell for them. The internet doesn't really help them either. And through my own experience, I feel a bit more of a psychological approach is needed.

 

I'll get there eventually, just a matter of effort, time, and research now.

 

It's pretty hard to not overeat in the USA in big cities.

Edited by LordJashin
Link to comment
Share on other sites

It's not pretty hard to overeat in any developed country, but the only way to really avoid it is discipline...

 

I agree. I also have some other observations. Does anyone know any tools I could use to provide like a translation button on my website? I'll have to look into that eventually.

 

Discipline is pretty hard in itself to do sometimes, especially if you were raised in such an environment where there is so many foods that are addicting, and readily available. It's not only how much food that matters, but the type of food too. Vegetables and Fruits have tons more nutrients and should be eaten more in my opinion. Many of us now (like me) didn't grow up on them, not really. And thus we don't like them, or worse, we never eat them.

 

I try to follow recommendations, whether they are valid or not. The ones I like at the moment are the ones Harvard University has posted on their website here. Another realization is that eating Red meat can significantly impact your life span, according to various studies. So I would stay away from it. It may be the saturated fats, or something else in the meat itself, but I still would advise 1-2 days max a week, or none at all if you can do it. Eat white meat like chicken or turkey instead if you can.

 

Another thing, is a balanced diet, with as much Carbs, protein, fats, and etc. that's recommended you should get daily. Personally myself, I feel I have trouble keeping up on protein. They recommend 50grams a day for men, and one 4 ounce patty is like 30-40g, but I don't even eat those daily or anything. Meat's not the only option, you can do nuts, and grains sometimes, and milk. I know i get like 10-20g from milk daily w/ my cereal. Then you have protein shakes, which from my research so far, I can't see much that is bad about them. Maybe its processed and has bad things about it? Idk. I think its made from nuts, and other stuff grinded up, but it can be an excellent source for protein.

 

I personally enjoy shakes myself. It's a good way to get the recommended amounts daily, rather then eating so much per meal. E.g. instead of eating fruits and veggies at every meal, and so many amounts of them, you can blend up like 2 cups of fruit and 2 cups of veggies for a nice shake. It tastes like a sugary tomato juice if you use V8 juice instead of veggies.

 

One other thing I'm interested in is muscle building, and how weight/muscle affects your mind/body. It's quite interesting, but I don't have much ground for my observations. But for muscle building, you most surely need that protein daily or even more than that. You can put on like a pound of muscle in a week or 2, if you eat more (gain weight), and do it right. Personally myself, I've always had a belly a little bit, never been totally skinny, or fat really. And BMI's are not great to go off of, sure I'm healthy but does that mean I'm "skinny" not really. And there's a 50 pound difference in the 6"3 category when it comes to being underweight and normal or overweight. I don't think you can put numbers to it, its just preference, and a lot of this is driven by Looks and etc.

 

Recommendations aside. History and other things have a lot to say about this subject too.

 

 

----

 

I'm interested to hear out what you readers think about eating, food, dieting, whatever, etc. So sign up, and reply please. I won't criticize, this is something us humans do regularly, and can be a topic of much discussion, and views. It varies by country, religion, lifestyle, experience, etc. for people.

Edited by LordJashin
Link to comment
Share on other sites

avJ7giIV5cDd6Lk6-Region.png

 

Most of the little things are finished. Now i gotta do the PHP security stuff, and the backend.

I heard BlowFish is a really good encryption and is uncracked? So I'll probably go with that if need be for w/e. Page tokens looks interesting.

It's fun to program in PHP.

 

I implemented input validation in Javascript with the Jquery Validation plugin, and added Mail checker to make sure no1 types in @gamail.com instead of @gmail.com Lol (suggests to them the alternative). I decided to not use any complex regexs for email validation, just /@/.

 

Input Validation Image

 

Going to try to use AJAX as much as possible. I got it to work with checking the email and username on the sign up form. However I have to modify it to do it not too much cuz i don't want people sending too many requests at once. Like on input focus change rather then on onkeydown as well.

 

 

I haven't even looked at some of the server stuff yet. Like .htaccess, and what i wanna do about the url's

 

 

It was quite a venture to CSS these pages. I still haven't added Total mobile/Responsive support yet either. I need to make my own presets for elements and stuff. KCXYr3Y2jcSZ5Cx2-Region.png

 

I like my color theory though in these pages. It's been fun doing that. Blue/White/Light blue for background/Black for text/ Dark blue for links. Except for that button Lol...I figured Black on a dark blue button wouldn't work so they are white text. Gotta keep the balance.

 

 

I was surprised how easy it was to design a little site just based off of Colors. It's so awesome you don't need images unless you want them. They do help.

 

It's also awesome how stuff you make like this is Eternal. It never goes away. Yayz :D

Edited by LordJashin
Link to comment
Share on other sites

Kk some of the back end is done. BLOW_FISH crypt is the best I think for password salting?

 

I'm kinda tied up on what to do about Sessions. I think I'm just going to create my own functions or a class, then make them use blow fish. Lots of reading, and interesting things about security. A little too much. I got the client side done for showing errors and such.

I'm gonna have to create a lot of fail safes for everything, and logging stuff. I'm sure there's penetration testing stuff and load testing stuff out there I can use to see if my coding is decent.

 

I'm pretty OCD on security measures. I've read and watched a lot of stuff on the topic.

 

I wonder what kind of security problems VBulliten has had, and SCAR Divi forums have had during its lifetime. I think there was once or twice where something happened I can't remember exactly.

 

 

I was able to handle 3 forms from one php file. What I wanna do is put in some kill functions to kill off stuff when usage gets too high and etc. ultimately going to maintenance mode if the thing is going to crash. Specially if some1 is DDOSing it. Just gotta limit the amount of http requests they can dish out, and then if abuse doesn't stop i guess i could throw a captcha in there to screw them all over lol. Whether any of this will be of use to this project doesn't matter, I could always use it in the future too.

 

Here is an excellent resource: http://phpsecurity.readthedocs.org/en/latest/Insufficient-Entropy-For-Random-Values.html

 

 

Gonna explore this too - https://github.com/padraic/SecurityMultiTool/tree/master/library/SecurityMultiTool

Made by the guy who created that resource. Very proficient in security concepts.

Edited by LordJashin
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...