|
It can be powerful, and it can look good, but it should all be so much easier.
The CSS box model is an horrible thing that seemed to ignore all the good lessons of previous layout technologies, much as HTML and JS ignored all the lessons from previous hypertext systems and programming languages (OK, JS does have some nice features, but the overall combination is fugly).
I find it abhorrent that HTML+CSS is making its way to the desktop, rather than better technologies making their way to the browser. If this trend continues, I may have to give up any attempts at UI programming, which is a shame as that's one of the things that initially attracted me to computing.
(Edited to avoid repetition)
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
I'm beginner at web development, and the js dynamic typing thing annoys me. I think dynamic typing doesn't work well for bigger programs, but for smaller ones it doesn't worth learning. It is much harder to learn than a statically typed language. You need to constantly check the documentation for the types.
Can you explain the disadvanage of box model, or could you give a link?
|
|
|
|
|
You're mostly right with respect to dynamic typing, but your JavaScript experience may not be enough to form a fair judgement - the first true OOP language, Smalltalk, used dynamic typing and came with a class browser that simplified finding the members you're looking for - categories group related properties. In these environments, you're actually working within a running program that you can inspect, edit and recompile parts of at runtime. The whole experience was decades ahead of its time.
The same group also invented the modern UI :- Windows, Icons, Menus and Pointers (WIMP) - so the Smalltalk environment was in many ways the first true GUI.
However, many developers prefer static typing. Feature like Intellisense are easier to engineer for such languages (although its an IDE issue if JavaScript fails at this, but the poor language design certainly complicates things), but the real advantage is that errors are detected earlier - for many kinds of errors, they can be detected before any attempt is made to run the program.
There are large groups in each camp. Funnily, the dynamic camp is often preferred for the speed and ease of development (no Compile/Link cycle), but your experience illustrates that some static languages fair much better.
But please don't think that JavaScript exemplifies the dynamic way. It is widely regarded as having a large number of mistakes in its design (such as implicit declaration of globals for undeclared variables).
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
Sorry, I missed the opportunity to rant about CSS there.
CSS was originally envisaged as a way to style elements in a HTML document: the font properties, alignment etc. of titles, blocks of text, etc.
Later, it was extended (bodged) to support layout.
Now, in Graphic Design, typically a designer looks at the page/screen/surface as a grid, and designs a layout in terms of that grid. CSS uses a model that is fundamentally based on a vertical stack of elements, with even worse support for elements that don't stack in this way well. Over time, features have been added either by CSS itself or pre-processors that add support for other types of layout to CSS, but it actually makes best practise in graphic design hard when laying out web pages.
The box model in CSS complicates things. The width of an element, as specified, extended by padding, border and margin in layout. This complicates using a grid layout, as you'll have to do some arithmetic to ensure things get laid out in a regular manner. CSS3 introduced a box-sizing property can alleviate this, but its just a shame the "normal" way of working makes best practice harder.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
Yes it's understandable if something is hard to design with it. The hardest is probably a desktop app. WPF has built-in grids.
|
|
|
|
|
Maybe in combination with mind meld so we never have to type again.
|
|
|
|
|
Dave Clemmer wrote: Maybe in combination with mind meld so we never have to type again.
Well, almost (shameless plug) watch the video.[^]
Marc
|
|
|
|
|
Interesting, here is another shameless plug (video)[^].
|
|
|
|
|
Dave Clemmer wrote: Interesting, here is another shameless plug (video)[^].
Great video! I'm curious -- do you have templates for generating web pages in say, pure ASP.NET or Razor/MVC ?
Marc
|
|
|
|
|
Marc Clifton wrote: Great video! I'm curious -- do you have templates for generating web pages in say, pure ASP.NET or Razor/MVC ?
Thanks! I don't have any public web page templates yet, but the membership site modelorientedplus.com [^] is largely developed with templates for Razor/MVC with repository, unit of work, and ioc patterns, all on top of EF code first. I should plan on posting a public version after the holidays, I'm doing a VITA ORM one first.
|
|
|
|
|
Hi Marc,
You were curious about templates to generate web pages. This article about the VITA ORM and .net application framework includes templates to generate SPAs with the MVC/AngularJS/WebApi/VITA stack:
VITA ORM and .net application framework[^]
Cheers!
Dave
|
|
|
|
|
As in, design, architect, comment their code, write useful tests, etc etc etc.
Marc
|
|
|
|
|
Dear 11 million CP members (especially those in QA), apply cold water to burnt area... Ouch
My blog[ ^]
public class SanderRossel : Lazy<Person>
{
public void DoWork()
{
throw new NotSupportedException();
}
}
|
|
|
|
|
Sander Rossel wrote: Dear 11 million CP members (especially those in QA), apply cold water to burnt area... Ouch
I speak of those whose code I have to deal with that, quite sadly, never even heard of Code Project. And this is particularly true when it comes to working in Java or Ruby on Rails.
Marc
|
|
|
|
|
Not sure in which category I fall... If I have to believe my successor my code is awful. Although I just stayed in an hour late to fix a bug he introduced when rewriting my software to 'make it more stable'... (and it was only a 10-15 lines function too!).
But everyone's code is awful according to their successors, such is the nature of programmers
My blog[ ^]
public class SanderRossel : Lazy<Person>
{
public void DoWork()
{
throw new NotSupportedException();
}
}
|
|
|
|
|
My code is awful for the myself of two days later, I'm not sure to want to know what my successor will think of it
Geek code v 3.12
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- r++>+++ y+++*
Weapons extension: ma- k++ F+2 X
|
|
|
|
|
Marc Clifton wrote: As in, design, architect, comment their code, write useful tests, etc etc etc.
Well, now you're just being ridiculous...
|
|
|
|
|
|
Collin Jasnoch wrote: There is a difference between a programmer and a software engineer.
In words yes, but in reality, "software engineer" is equivalent to calling the garbage man a "sanitation engineer."
Marc
|
|
|
|
|
|
Collin Jasnoch wrote: while the other also know "why" you do it
Oh, I totally agree. My point was that there are people called "software engineers" that shouldn't be allowed to touch a computer program. The term "software engineer" is abused and misapplied, such that when you hire a so-called S.E., what you get is little better than a VB copy&paste monkey.
I would like to see the term S.E. apply only to those people that have demonstrated engineering skills, and definitely NOT by whether they hold a fancy CS degree.
Marc
|
|
|
|
|
|
Thank you for getting to the impracticality of it in an undergraduate degree.
My Degree is Computer Science, and I earned a BSE. The E came from the math and physics of it.
It is earned through the college of Engineering. This was 1992, Michigan State University.
We studied Computer Programming and Software Engineering Concepts. I stress the Concepts.
Software should work repeatably. We learned the Waterfall approach (literally at the time the only approach discussed outside of "ad hoc" which was shunned, but recognized as how we do programming for all of our classes, LOL).
Roughly stated, We had to cover:
- General Programming, algorithms, data structures, theory on problem solving, etc (Pascal)
- Write C/Assembler (Motorola).
- Write an Assembler, in C (literally the next course)
- Write a compiler, DB Engine and/or an AI program (in LISP no doubt)
We had to CARRY our code from trimester to trimester, to teach us a lesson that bad code begets big problems when you add more functionality to it! A valuable lesson in deed!
And then we graduated...
I have absolutely no idea where you would INJECT the 2-3 years it would take to make someone a Professional Software Engineer in that environment. And given the choice, I would rather be a CODER who can actually solve problems, use References (patterns, later, after I graduated) and the like.
Finally, we have an astounding shortage of programmers and programmer/analysts going into and coming out of the Universities. The graduating classes were shrinking as I was graduating. The kids don't have the math and problem solving skills coming out of High School. One of my friends flunked out because he could not get passed the Calculus Based Physics. He writes software without a degree and does a pretty decent job.
We have a MANAGEMENT problem whereby management does not understand that Designers should Design. Engineers should Engineer and Developers should code! Most small companies I see can barely afford ONE of these guys (and I see many who actually TRY TO HIRE the CHEAPEST ONES, LMAO!), much less hire the team.
The owners/managers think that because they can explain it, it can't be that hard. They don't need to pay to have an ENGINEERED solution. Sometimes they are right. Mostly not. Not in the long term. But I don't think 80% of the software written would have been started if the COSTS were known up front!
Everyone wants software that pays for itself immediately these days. Not even a 3 year payback. It reminds me of Hollywood where they build props. They LOOK REAL in the movie, but the metal is really just WOOD with paint. Management wants the cheapest solution they can get. I can't fault the programmers who are not in an environment that practices the proper approaches to software development and engineering...
|
|
|
|
|
|
Collin Jasnoch wrote: This makes me wonder if we the solution providers are in fact part of this problem in that we have explained it too clearly in some cases. On top of that we have undermined ourselves because that seems more natural. In other words, we told them it was easy. While it may have been easy for us that is only because we have had the training and years of experience to make it easy. We need to stop doing that and gloat a little. We should not obfuscate the explanations, be we need them to understand that it was the skill that made it understandable.
My comment was actually before that step. My primary role is a consultant. I go where no IT teams (or small, overwhelmed ones) exist. It is not that the developers have said it is easy. The managers/owners think it can't be that hard, simply because they can explain it. (ie, they ONLY skill they lack is software writing/programming). Ergo, we will hire a programmer to do X.
But X is only what they WANTED, probably NOT what they NEEDED. Certainly not designed to answer any other questions, etc.
It is my fault when I fail to educate the client. My job is to listen. Then to understand. Then to question everything. Then I should show them what they probably need and can usually afford. I try to put this in the clients terms, and I STRIVE to be WRONG OUT LOUD! I want EVERY assumption I am making stated clearly in front of the client, and they have free reign to correct me.
Only after a few iterations can I possibly know what to build. Then it is my job to build it properly... Within their constraints... Or walk away. And I certainly walk away... Sometimes I even RUN! I don't want the client who says "Whatever... I already told you what to build, just go build it".
I know it is hard to say no to the $$$, but at this point in my life, I have enough $$$ to say no to crazy people... It isn't worth the scars!
If businesses treated their software like their other Intellectual Property, developers habits would adjust to reflect that reality...
But Collin I agree with where you are coming from, and almost all of what you said!
|
|
|
|
|