Katherine Mejia

Greenhorn
+ Follow
since Jul 01, 2016
Katherine likes ...
jQuery Python Clojure
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
4
Received in last 30 days
0
Total given
32
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Katherine Mejia

Bear Bibeault wrote:

Katherine Mejia wrote:JavaScript is such a weird language when it comes to how functions are called/initiated.



I would say "varied and deep" rather than weird.

DOM is a big part of Javascript


Not true, or at best, misleading. The DOM is not part of the JavaScript language. It's part of HTML (and that's simplifying things, but will do for now). The browsers provide JavaScript bindings for a DOM API, but that doesn't make the DOM part of JavaScript.


True. Good points. I should have stated it better. I'm now really exploring the various depths of JavaScript. I find it to be a fascinating language, so far.
How awesome! Thanks for this thread. So far I'm signed up to freesound. It's pretty neat.
3 years ago
JavaScript is such a weird language when it comes to how functions are called/initiated. DOM is a big part of Javascript, because it's often used in reference to HTML elements, and you can call a function in JavaScript, or with an action event in HTML. It really depends on what you want each function to do in your program.

A very common one is body onload



For instance, you might want Javascript code to simply do something when you press a button.

Then you can create a button in HTML and do this:

But what if you want to be able to change something every time you click the button, like, make something move or get larger? Then you might need to put the click event in javascript:




Sometimes you want a function to by triggered by another function.



There are also times when you want to just call a function





I also wanted to state that I wouldn't recommond JavaScript as a first language, as it might confuse you when you learn other programming languages. In my personal opinion, if I had it to do over again, I would have gotten a good grasp of Python and maybe C/C++ before moving on to other languages. It's important to have a decent understanding of functional and procedural programming, and it can help you to think more algorithmically. But...that's just my humble opinion.
I was having a discussion with a programmer friend who had helped me understand for and while loops better. Let me see if I can explain what was explained, well.

So you have a for loop, and you have these statements, that you call a, b and c...

so you have

for(a;b;c){
d
e
f}

a declares the initial value of a variable, and c is to change the value each time it loops around. With b, the default value is a boolean. Thus, each time the value is changed, the value of items are re-evaluated to determine whether or not b is true or false, and as soon as b is found to be false, the loop ends. When you want to have control over the initial value of a variable, the ending value and how the values are changed each time the loop loops around, the for loop is a good loop.

A while loop just has one element, and it's basically the equivalent, I believe of the b element in the for loop. It basically works in a boolean sense. Either the terms of the loop is met or not

so you have
while(b){}
basically while b is true it will loop. When b is false it will stop. It's a much simpler kind of loop which works if you only want to determine when you want the loop to end. As you get the hang of programming, you'll get used to when to use which, much better.

Paul Clapham wrote:

Katherine Mejia wrote:Bill C-16 is an instance of the government dictating to people what speech is considered correct and incorrect. It is a huge threat to free speech. It should definitely not exist in the US where the first amendment grants it's citizens freedom of speech, and yet it makes it's way into California. The "right" to not be misgendered is not a basic human right. If that's the case, billions of people should be on the chopping block for their crimes against humanity. There is, not even a fine line between an actual right that a human being is granted in order to be considered a dignified person and someone being so entitled they can't stand for someone to say something to them, even the slightest bit triggering. I don't mind calling someone a "ze" or "zim" or "they" if they politely request I do so, but no one has the right to force someone to say that. That is NOT a human right, because it infringes on one of the most basic of rights a person should have: the ability to determine for themselves what is the right thing to say. Any society that has Bill C-16 as a law, in effect, does NOT have true freedom of speech.



You've got a lot of things in there which (as far as I can tell from the Wikipedia article) have nothing to do with Bill C-16. The bill forbids discrimination on the basis of gender expression, but (again, as far as I can tell) it says nothing about your concerns about political correctness. It's true that Canada also has laws against hate propaganda, which Bill C-16 adds to; it's certainly true that laws against hate propaganda interfere with free speech. But those things you listed there: declining to use somebody preferred pronoun wouldn't be considered as "hate propaganda" by any court. Even declining to do so in an insulting way wouldn't be considered as "hate propaganda". Saying a triggering thing to a fragile person isn't "hate propaganda" either. There aren't enough courts to handle all of the cases that would arise if they were.

By the way my preferred pronoun is "you". So I'd appreciate it if, when you're discussing me with other people, you'd refer to me as "you".



Hmmmm...the Wikipedia article doesn't mention the pronouns part, even though that was what spurred the biggest controversy surrounding the bill. I only see it mention Jordan Peterson and how he felt that it would be a thread to free speech.  
Ha I like this bit:

In November 2017, Lindsay Shepherd, a teaching assistant at Wilfrid Laurier University who showed a video of Peterson's critique of Bill C-16 in her "Canadian Communication in Context" class, was reprimanded by faculty members, who said that she had created “a toxic climate” for students by showing parts of Peterson’s argument, compared it to “neutrally playing a speech by Hitler”, and that she had violated Bill C-16.[17][18] Commenting on the incident, University of Toronto law professor Brenda Cossman noted that the Canadian Human Rights Act (which C-16 amended) does not apply to universities, and that it would be unlikely for a court to find that the teaching assistant's actions were discriminatory under the comparable portions of the Ontario Human Rights Code.[19]

3 years ago
And if you ask what makes freedom of speech and of religion such important rights, over other rights, it's basically because these are fundamental parts of being human.
When you become an adult, you naturally want to decide for yourself what ideas that you subscribe to and you want to be able to express those ideas. Not being able to hold to your own ideology nor to be able to express to others is the purest form of oppression in existence. When you are a child, your parents share with you their values, but when you become an adult, or even in adolescence, it's natural for you to question your parent's values. It's a part of attaining to adulthood, and highly authoritative rulerships, religions and cults that do all the thinking for their adherents, and even companies that spy on even their employees' private communications--treat individuals like perpetual children, unable to make the most important decisions for themselves. But, the only way people can feel truly human is to be able to make those decisions, even if they lead to heartache and pain sometimes.  
3 years ago

Joe Ess wrote:

Pete Letkeman wrote:
It is therefore somewhat dis-concerning knowing that even two different levels of government in a country like Canada cannot agree on what exactly human rights should entail.



As long as Ontario recognizes the same and/or more rights than Canada, I think things are working as intended.  If Ontario either refused to recognize a right that the national law recognized, then you'd run into problems.
This is an interesting time for the concept of human rights, because we're seeing a lot of legal cases where someone's rights come into conflict with others.  For example, there's Bill C-16 in Canada and the cake baking case in the US.  
(Rattlesnake Pit here we come!)
Unfortunately for us in the States, the cake baking case wasn't really decided on the merits of the case, but instead on how the lower court handled it.  I think both sides of that case had good cases for their rights to be respected and the court just kicked the can down the road as far as having to make a decision on cases such as this.



You make it sound like the side of the person denied service has an equal claim as the person who denied the cake when that's not the case. The person was willing to sell a cake, just not willing to decorate it. I don't think any constitution upholds "the right to get ANY service you want from any business" as a basic human right, whereas the US constitution does hold up freedom of religion as such.  

I always say religious freedom is one of the most important freedoms to uphold, and, I'm sorry but it way upholds the right for same sex couples to get married. Religious freedom is not just the freedom to HAVE a religion. It also includes the freedom to opt out of religion. Ultimately, it means the right of each individual to not have their values dictated to them by the state. When a nation lacks religious freedom and either has a state religion, or is atheist, as in socialism or communism, there is very little to no instance in which the state does not dictate to its people what their values should be, and use some kind of policing to enforce such values. This sounds like a slippery slope fallacy, since, the court ruling shows that, religious rights are currently not in any immediate danger. However, it's something that should be of concern to anyone who feels that they should determine their own values, and not have those values dictated to them. If the cake baker had lost the supreme court ruling that is exactly what would have happened: It would have been an instance of the state telling this man what his values should be (aka "don't follow your religious based conscience that's wrong. the 'correct' course is to give this person any service they want"). Even if I were a staunch atheist Dawkonist, I would still sympathise with the baker for that very reason.

Bill C-16 is an instance of the government dictating to people what speech is considered correct and incorrect. It is a huge threat to free speech. It should definitely not exist in the US where the first amendment grants it's citizens freedom of speech, and yet it makes it's way into California. The "right" to not be misgendered is not a basic human right. If that's the case, billions of people should be on the chopping block for their crimes against humanity. There is, not even a fine line between an actual right that a human being is granted in order to be considered a dignified person and someone being so entitled they can't stand for someone to say something to them, even the slightest bit triggering. I don't mind calling someone a "ze" or "zim" or "they" if they politely request I do so, but no one has the right to force someone to say that. That is NOT a human right, because it infringes on one of the most basic of rights a person should have: the ability to determine for themselves what is the right thing to say. Any society that has Bill C-16 as a law, in effect, does NOT have true freedom of speech.
3 years ago
Okay, I have some code to kinda get started. I got some help from a friend.

So, to change the the text of an increasing amount of text items...



and for the javascript...so far...

Campbell Ritchie wrote:

Katherine Mejia wrote:. . . . I'd appreciate a dress from SO. . . .

It shows the dangers of abbreviations. I came back to this thread and found myself wondering, “Why on earth would anybody want a dress from StackOverflow?”


That would be easy. You just ask the people on StackOverflow how to make a dress, they make the dress for you, then you just have to copy/paste it XD XD XD

3 years ago
It wasn't until the 2000's. I feel like such a noob, now, haha
3 years ago

Pete Letkeman wrote:I wonder how many of us have hobbies which do not include using computers?
For instance, every now and then I create 3D models which could possibly be used for computer games or animations.
Without a computer I'm not making 3D models.

I find fitness to be a pretty good hobby. Sometimes is nice to get out and run for a few kilometers or more, getting fresh air in your lungs while listening to music.
I prefer to do get my workout/run done early in the morning when only a few people are up and about.


I wanna get into 3D modeling myself. I have a slew of Blender tuts I'm following. I just need to make the time...
3 years ago
I like to make art. I'm getting into a big watercolor phase. If my initial shyness lifts, I might show some of my stuff. I also like to do graphic art and such. I also like to cook and bake, but I kinda consider it to be more of a daily necessity than a hobby XD, though I do try to add more artsiness to it. I also like to write stories when I have time.
3 years ago

Paul Anilprem wrote:If yes, do they wear them? If no, should you?


Haha, such an interesting topic for a coding forum.
Since my SO would be male, i would not buy him a dress :P. I tend to not be into that kind of man.
But, to give a female perspective, I think I'd appreciate a dress from SO. Buying a dress for a woman can be very tricky tho. Women's sizes are NOT consistent at all. Maybe see if you could find a dress she has already and get the measurements to make sure it fits well. Plus there's the aspect of style. Maybe see if she has a pinterest; as pinterest is the place where women post the things they really want ;)
3 years ago
Typically I seek my own solutions via google and looking up what's been done befpore, but some problems, such as this one, I have a difficult time, figuring out how to word it in just the right way to get a good result. So, even if you're not really an expert in "Vanilla JS", maybe you can still help by pointing me to a good tutorial that has a solution that I can use.

So this is, in detail, what I would like to do. I want to set up my code, so that each time I click a particular <div> item, the style, namely the color, of a text item at the bottom changes, but when I click again, the next item from the bottom changes, and the item at the bottom stays changed. This would go on this way, until all the items have been changed, and on next click, all items will go back to their original state. Also, I would like to have an item next to this list of items that change, with something like a guage that resizes to match the level of the changed text. A general idea of what I would like to do is something like an interactive thermometer.
here is a gif that nicely illustrates what I would like to accomplish on each click except let's imagine that the temperatures are changing from gray to black to match the level of the mercury.
I think I can figure out the styling aspect, since, I have a general idea how to restyle things in js, but I'm just starting to get a feel of how to do more special effects and things like this. Again if you can just point me to a good tut or list of tut or documentation that can help, I would 100% appreciate it.