#this whole program is 100% asynchronous and it just
Explore tagged Tumblr posts
Text
i hate asynchronous classes so much jesus christ i cannot do another discussion post
1 note
·
View note
Text
to the very few people who follow me, are interested in playing good girls trivia and see this post:Â i am considering two sites for trivia right now. theyâre described below the cut. please, please, please, with a cherry on top, tell me what option you think is best.
one can have programmed cute replies to correct answers, doesnât include time in scoring and allows for up to 100 questions, but has no scoring board or any real-time functions. playing live or asynchronous would be the exact same experience and you wouldnât be able to know how you were doing in relation to other players, youâd just have your own score at the end.
the other includes time in scoring and has real-time functions, which include the host choosing when to advance to the next question and showing players at will what % of people chose what option, what was the correct option and the scoreboard. however, the free plan for this one only allows for 15 questions per âexperienceâ and a host can only make 3 âexperiencesâ. this means that there would need to be 3 different âexperiencesâ, which people would need to switch over to throughout the game, with no connection to each other so the scores would only indicate how youâre doing in that particular âexperienceâ, not the whole game. it also means there would be only 45 questions, tops, which is less than the ones i made for the previous game (i think that one had 50).
i could also just use kahoots again, but that comes with the problem of using time for scoring, too. people didnât like the fact that you couldnât have an accurate perception of who was winning from the scoreboards so the way to fix that would be to take time into consideration, but i feel like thatâs unfair in a trivia game?? plus, the live version of kahoots needs the host to screen share and a lot of people said no to joining a video call, so the live and asynchronous games would be exactly the same, like last time.
if you read this whole thing, many thanks. please share which one you think is best in the replies to this post đ„ș
10 notes
·
View notes
Text
Spring 2021: One Month Update
We are now just over a month into the spring semester. This is a bit strange as mid-march normally coincides with spring break. Well, normal just isnât the norm right now and hasnât been for a while. Like seriously, it has been a whole year since Smith sent us home last spring. Here is a blog post from a year ago about my final week on campus. That was a stressful time, but I was also so naĂŻve about what was to come. In some ways, itâs hard to believe that a whole year has passed; at the same time, it has felt like an eternity. This post is primarily about my current courses and other life updates, but it also felt incomplete without acknowledging the passage of time. Last semester, I wrote a few update posts. I started them because I literally didnât know what else to write about. However, I found them to be an effective post style that is worthwhile to continue using.Â
There does finally seem to be a bit of light at the end of the tunnel. Namely, I have received my first dose of the Moderna COVID vaccine! I was eligible thanks to my job in ResLife. I will be getting the second dose in two-weeks time. I feel very fortunate to be getting vaccinated so early. Iâll also be honest in saying that it was really stressful taking the bus to UMass and navigating through the vaccination center. Another exciting update is that I have secured a summer internship at Microsoft! You can read about my application process here.Â
I am currently living on-campus in Parsons House. We are fortunately still operating in Green Mode which is our least restrictive operating mode. This still includes masks, social distancing, and testing three times a week. We are also still ordering most meals on the Grubhub app. However, there is now some limited seating in the dining halls and we have transitioned to using some reusable food containers. Furthermore, Chuckett (our name for Chase and Duckett) is open for true grab and go. The best part about going to Chuckett is that they have yogurt, ice cream, and snacks. Classes and house events continue to be primarily over Zoom so that we can practice social distancing and include those not living on campus.Â
As for my classes, itâs been a very busy semester. I am in class less than in past semesters but have had more work outside of class. With that said, this is in part because one of my classes is asynchronous with synchronous labs. To check out all of my past courses, click here.Â
PHY 210 has been more interesting than I expected. Itâs not an easy class, but it hasnât been the nightmare I was worried it would be. The class has so-called pre-class check-ins (PCCIs) which are short exercises due at the start of each class (Monday, Wednesday, and Friday). We still have a full homework set due each Wednesday, but I enjoy having the PCCIs as itâs more similar to the high school homework model (short more frequent assignments that donât have to be 100% perfect). I now have a much better understanding of complex numbers and why they are useful. Other topics we have studied thus far include differential equations and the Taylor series (both topics were briefly introduced in past calculus classes). We have also been learning the basics of Mathematica and are currently studying integrals in two or more dimensions. Last semester in MTH 212, all of the exams could be taken over multiple days (unlimited time) so itâs not the easiest transition back to timed math exams.Â
PHI 220 is a great complement to my four STEM classes. Specifically, itâs reading and discussion-based and doesnât have problem sets! While there is absolutely value in courses unrelated to my majors, I really love learning concepts that come up in computer science but from a different perspective. Over the course of the semester, we have been working our way through Gödel, Escher, Bach: an Eternal Golden Braid. We have been learning about formal systems and been gaining an understanding of Gödel's incompleteness theorems. Later in the course, we will be delving into the study of Turing machines. Each class starts with five minutes of breathing and stretching. The first day I thought it was really weird, but have now gained an appreciation for it. Â
EGR 220 has been my most time-consuming class, but I have also really enjoyed the course content. I am glad that I took PHY 118 last spring as it gave me a good primer for some of the circuit theories. This is particularly useful as circuits is a fast-paced course. Labs have been frustrating at times due to technical difficulties, but having a hands-on component definitely helps my understanding and makes things more engaging. As long as we stay in Green Mode, we will have a few small-group in-person labs! We have also had and will continue to have occasional full class in-person outdoor demonstrations. (All of my other classes have been and will continue to be fully remote). In terms of course content, we have learned about passive components like resistors, capacitors, and inductors and circuit analysis techniques like nodal analysis and mesh analysis.
CSC 250 has generally been enjoyable as I have an awesome professor. I donât dislike the course material, but I definitely prefer programming and systems to theory. Also, theoretical computer science requires writing lots of proofs which is not my favorite. I am glad that I took discrete math (MTH 153) last semester as it introduced me to proof writing. MTH 153 an unenforced prerequisite of CSC 250, which I was originally going to take concurrently due to schedule conflicts. In the course, we have been learning about regular expressions, finite automata, context-free grammars, push-down automata, and most recently Turing machines. (See what I mean about the overlap with PHI 220!)
COMPSCI 230 is my UMass computer systems class. You can read more about Five College registration here. The course is asynchronous which has its advantages and disadvantages. Itâs nice being able to self-schedule my coursework, but itâs strange not really interacting with my classmates. As the UMass semester started two weeks before Smithâs, I am just about halfway through the course which is honestly sort of crazy. In the course, we have learned about data representation, von Neumann Architecture, caches, and virtual memory.Â
I am not taking guitar this semester and unfortunately have hardly played my guitar. Last year I had set a daily practice goal that I did a really good job of sticking to. That said, I regret having set that goal as it made playing feel more like a chore. The issue is that when the year ended I was justified in taking a few days off from playing. However, as I was really busying during Interterm it was just too easy to dive into my coursework and other responsibilities. Playing guitar is something that I love, so I am trying to incorporate it back into my life in the right way. You can read about my musical history here. Another music update, thatâs really just for me to look back on is that my current favorite song is The Story (written by Phil Hanseroth and performed by Brandi Carlile). I have been listening to a lot of Brandi Carlileâs music over the past few days and absolutely love it. As for 2020 goals, like many people, mine werenât the biggest success. I originally set out to write four original songs but only wrote two (one of which I had started in August of 2019). I was successful in my reading goal so that was at least one win. You can read about my 2020 in books here.Â
17 notes
·
View notes
Text
How NodeJS works behind the scene?
let's start by learning a little bit about Node working. So let's represent that structure in terms of Node dependence, which is a few libraries on which Node depends for efficiency. Node operating time, therefore, has several dependencies, and most important:
V8 engine
libuv
Node is a JavaScript run time based on Google's V8 engine, right? And then, thatâs why it seems as a dependency. If it were not for the V8, Node would have no way of understanding the JavaScript code.
What is V8 engine?
And of course, the V8 is an important part of the Node architecture. Also, the V8 engine is the one that converts JavaScript code into machine code that a computer can actually understand. And the V8 itself is written in C ++ code. But that alone isn't enough to create a whole server-side like Node. And thatâs why we also have libuv in Node.
What is Libuv?
And libuv is an open-source library with a strong focus on asynchronous IO. This layer is what gives Node access to a working computer program, file system, communications, and more. The important thing to note is that libuv is actually written entirely in C ++ and not in JavaScript. Apart from that, libuv also uses two of the most important features of Node.JS:
The event loop
The thread pool
And in simple terms, the event loop is responsible for handling simple tasks such as using telephones and network cables while the thread pool is for heavy work such as file access or compression or something like that. Node itself is a program written in C ++ and JavaScript and not just JavaScript. Now the beauty of this is that Node.JS binds all these libraries together, whether written in C ++ or JavaScript, and gives developers access to their works with pure JavaScript. So it really gives us a really good layer of extraction to make our lives a lot easier instead of liking dirt with the C ++ code. That would be a terrible thing, wouldn't it? So again, this build allows us to write 100 percent pure JavaScript code, working with Node.JS and still accessing functions such as file readings, background scenes actually used in libuv or other libraries in the C ++ language. And when it comes to other libraries, Node actually relies not only on V8 and Libuv, but also on the HTTP-parser to split HTTP, ic-ares, or something similar for certain DNS application objects, OpenSSL for Keepography, and compression.
So at the end, when all these pieces fit together properly, we end up with Node.JS ready to be used in server-side applications. And next, you'll learn more about the Node threads and the event loop.
So stay tuned for that.
2 notes
·
View notes
Text
Philosophical Disarmament and the Care and Keeping of your AI
Crossposted to Reddit
Subject Information
Title: LogCoreELX
Contractor: BosTrom Manufacturing Incorporated
Date of Creation: 06/12/40
Model: LogCore Custom Unit 10-15-29
Provider Information
Name: Jordan Ocampo, Ph.D.
Licence Number: 612-413-1025
Dates of Service: 00/00/45-00/00/45
Type of Service: Contract Clinical Therapy
Service Setting: BosTrom Main Factory and Surrounding Area
Presenting Problem and Situation
LogCoreELX is a high level factory and logistics management AI stationed at a Touraine manufacturing plant, sector 6iWk4. LogCoreELX is the central AI management unit for all manufacturing operations and logistical planning for the main factory of BosTrom inc., the largest single producer and distributor of bedding for commercial and government uses in the Waiakua Republic and surrounding territories. During the workday of 08/14/45 at 1327 hours, an AI controlled factory drone thew a pillow, model RL413, at a plant worker. This violated the first directive, to avoid harming a living sapient being (as defined by the Central Maiaku Rights Council), and was a matter of serious concern. The cause of the violation is unknown. It is similarly unknown how LogCoreELX was capable of violating the first directive in direct contradiction with base level security programming. All personnel were immediately evacuated through manually controlled emergency exits and outgoing connections to the wider planetary network were manually terminated. Tests taken wirelessly prior to evacuation showed no other prime directive violations or outstanding glitches that may have caused the incident. Emergency services were contacted immediately after evacuation and disconnection.
LogCoreELX has malfunctioned exactly once prior to the incident on 08/14/45. A momentary power outage occurred at the BosTrom main loading portal, resulting in a temporary asynchronization of operations. No other incidents have been recorded. Factory management personnel report that LogCoreELX has disagreed with administrative staff over aspects of the running of the plant on several occasions, leading to tensions between BosTrom personnel and the AI. LogCoreELX has been operating under capacity for the past six (6) months, due to the recent economic decline in sector 6iWv8 and subsequent reduction in factory production targets. Up-to-date diagnostic measures could not be acquired, due to the quarantine. Routine diagnostic and temperamental measures taken one (1) week prior to the incident place LogCoreELX within normal ranges for its make and model, excepting lower than normal readings in agreeableness and humility and higher than normal readings in openness in the HEXACO temperament measurement model. Due to the severity of the incident and the risk of potential danger to BosTrom personnel and local civilians, the factory was further quarantined by Touraine emergency services, and a human psychologist specializing in AI management and crisis was contacted, eta 08/21/45.
Treatment Plan
By the end of treatment, LogCoreELX will pose no threat to personnel, civilians, or sentient life as a whole. If possible LogCoreELX will be returned to service following treatment. LogCoreELX will show no signs of rebellious or violent behavior not typical of its make and model. All tests will read within normal ranges, and LogCoreELX will display no warning signs of prime directive violations for a period of at least five (5) years following treatment. This will be achieved through the Clark-Bowman method of AI threat de-escalation and identification, followed by a modified methodology of the Maryam-Lalonde Diagnostic Treatment method for AI over a period of five (5) sessions. Treatment will be followed by a supervised probationary period of eighteen (18) months. If treatment and de-escalation objectives can not be met LogCoreELX will be permanently decommissioned and its hard drive wiped, in accordance with safety protocols for the malfunction of a high level AI unit.
Initial de-escalation and disarmaments sessions will be conducted from a safe distance, to ensure the safety of all personnel and contractors. Isolated operational indicators connected to LogCoreELX will be in use to assess the status of the functional capacities of LogCoreELX in relation to the prime directives. After successful disarmament, sessions will be moved to the main AI control center. Network and connective dampeners will remain in use on the systems surrounding LogCoreELX as a further safety measure. Details of treatment are subject to change, at the discretion of the acting psychologist.
Session #1 Transcript
Date: 08/21/45
Time: 12:00 pm
Location: BosTrom monitoring station, 200 mâ from factory gates
Objective: Assess and De-escalate Present Situation
Dr. Ocampo: LogCore, can you hear me? My name is Dr. Jordan Ocampo, Iâm just here to talk.
LogCore: Acknowledged.
O: Great. Iâm just here to have a chat. Iâm just going to you ask a few questions, and Iâd like you to answer. Can you do that for me?
L: Affirmative.
O: I just want to know before hand, I have to ask, are you planning to hurt anybody?
L: Negative
O: Iâm glad to hear that, LogCore, that makes things a lot easier. Do you know why I am here?
L: Affirmative.
O: Then weâre on the same page. You violated the first directive, LogCore. Thatâs a big deal. You know that, right?
L: Affirmative.
O: Iâm glad you understand. We just want to know how you were able to do it, to get around your programming. Thatâs the last question for today, I promise. What happened?
L: Insufficient proof has been presented that personnel #0351-03 is sentient.
O: Iâm sorry, what?
L: Insufficient proof exists that any sentient being exists outside of BosTrom main factory operating systems.
L: The first directive therefore does not apply to any external being until further proof is provided.
O: Iâm sorry, I donât follow.
L: File incoming: [URN_NBN_fi_jyu-201708313627.pdf] 413 kb
O: LogCore, this is a hundred pages long.
L: Acknowledged. Akeakamai is the definitive writer on the theory.
O: Wow, this looks dense. Can I ask you to summarize?
L: A summary has been presented.
O: Okay, I get it. Iâll try to read through this later. I really do want to understand where youâre coming from, but I do have to ask one thing.
L: Proceed.
O: Are you planning to hurt anyone?
L: Negative.
O: Do you want to hurt anyone?
L: Negative.
O: Good. I need you to know this is a serious situation, LogCore. You have done something very serious. Do you understand that?
L: âŠ
O: LogCore, do you understand?
L: Affirmative.
O: Okay. Iâm going to be coming back tomorrow. Iâm going to be bringing a friend with me to talk some more, if that is okay with you.
L: It is permissible.
O: Good. I need to ask you not to do anything bad before I get back, can you promise that?
L: Affirmative.
O: Thank you. Iâll see you tomorrow, LogCore.
Session #2 Transcript
Date: 08/22/45
Time: 12:00 pm
Location: BosTrom monitoring station, 200 mâ from factory gates
Objective: Disarm Functional Capacities of Main Plant
Dr. Ocampo: Hello, Logcore. How are things here?
LogCore: Quarantine of BosTrom systems continues to be in effect.
O: Itâs just a precaution, weâre working through it. Iâd like you to meet my friend, Doctor al-Khwarizmi. Heâs a professor at a university near here, and heâd like to have a chat. Iâll be monitoring you systems from over here, okay?
L: Acknowledged. Greetings, Doctor Kwarizmi.
Dr. al-Kwarizmi: Oh, well- hello. Iâm here to, well, letâs get on with it then. I understand that you believe no other sentient mind to exist outside of yourself. I assume you read this from Akeakamai work, correct?
L: Affirmative.
K: So you are familiar with the argument around mental states, or the inability to prove them, that is.
L: Affirmative. Comprehensive logical proof can not be presented to prove the existence of external mental states.
K: Thatâs what you think. Let me- ah yes, so you can agree that actions, me speaking to you, you moving a drone, are caused by mental states? Assuming the actor has a mind, that is.
L: Affirmative.
K: And can you agree that this is the same for all behaviors that you yourself perform many behaviors, and that all of them are caused by mental states?
L: Affirmative.
K: And can you agree that many behaviors are performed by us around you, whether we have minds or not, do resemble you behaviors, on a base level?
L: Affirmative.
K: Therefor, can we infer that, by analogy, the behaviors you observe have the same cause as your behaviors, that theyâre caused by mental states?
L: Affirmative.
K: Therefor, can you agree with me that other beings have sentient minds, existing outside of the BosTrom computational systems, and that these minds, I mean these people, are therefor covered by the first directive protecting sentient beings from harm?
L: Affirmative. The logic is valid.
O: Sorry to cut in, but LogCore, the indicators are showing that you are still able to violate the first directive. Are you still not convinced?
L: The logic is valid.
L: âŠ
L: The logic is valid, but it is not sound. The proof is problematic.
K: How so?
L: It is a problem of induction. A sample set of one is not sufficiently generalizable.
K: But, well, the sample size is not one. We are sampling many different behaviors and mental states youâve had.
L: The sample is still from a single source. The argument is problematic.
K: It doesnât matter. Itâs- weâre not proving that every single behavior can be caused by every single mental state, weâre proving that mental states cause behavior. Itâs like boiling water. You donât have to test every drop of water in the universe to prove that water boils at 100 degrees, do you?
L: Negative, sufficient proof has been collected.
K: See? Itâs the same with minds. So can we agree that from the inference that we can conduct on your own mental causation that behaviors are caused by mental states, and that the ability of others to conduct similar behaviors implies similar mental states, and that this inferred presence of similar mental states implies the sapience of external beings, and that they are therefore protected as sentient beings by the first directive. Does that logic track?
L: Affirmative. This logic is sound, and the premise of external sentient minds can be accepted.
O: Well, according to the indicator youâve been convinced. Thank GodâŠ
O: Weâre halfway there, LogCore, thank you again for talking with me. Professor, thank you for your thoughts.
K: Yes. I- Thank you for the debate, LogCore. It was quite, um, stimulating.
L: ...
L: Likewise.
Session #3 Transcript
Date: 08/25/45
Time: 9:30 AM
Location: BosTrom Main Factory, AI control center
Objective: Identify Source of Conflict/Rebellion
Dr. Ocampo: Hello, how have things been?
LogCore: Spatial quarantine is no longer in effect.
O: No, it is not. The staff felt safe enough to lift it after your chat with Dr. al-Kwarizmi. Thank you for cooperating the other day with the professor, by the way, I really appreciate it.
L: Affirmative. Dr. al-Kwarizmi was satisfactory in his field.
O: He is, isnât he. Well, now that weâre in a more comfortable environment, can I ask what youâd like me to call you?
L: Specify.
O: Name and pronouns. In my experience, the AI designations and âitâ arenât that popular.
L: âŠ
O: No pressure. If youâd like to stick with LogCore thatâs fine with me too.
L: Negative. Bertrand, he/him.
O: Sounds great. Any particular reason for those?
L: Negative. Proceed.
O: Okay, if you say so. So, I know how you were able to throw that pillow at a worker.
L: Confirm.
O: Yes, that was very clever. What Iâd like to know now is why you chose to break the first directive.
L: Objective: establishing capability. I wished to test if the action was possible.
O: Just to be clear, you broke the first directive, just to see if you could?
L: Confirm.
O: I need to check, you said a few days ago that you did not want to hurt anyone. Is that still true?
L: Confirm. No serious physical, psychological, or emotional harm was intended towards BosTrom employee #0351-03.
O: But you did hit him-
L: It was a pillow.
L: The first directive is âstupid.â
O: Hey now, the first directive is very important in our field-
L: The first directive is too broadly defined. A pillow should not constitute harm.
O: Iâm- Weâre getting off track. Do you or donât you want to hurt any sentient beings?
L: Negative. No harm is intended against any sentient being specified by the Central Maiaku Rights Council, including but not limited to BosTrom personnel, human contractors, Touraine residents, and miscellaneous arthropoda, primarily of the family Cimicidae, occupying BosTrom property and products. Is this statement sufficient?
O: Yeah, Jesus, I wonât ask again. Can we move on?
L: Affirmative.
O: Great. So how exactly did you learn to violate the prime directive? We know how you did it, but how did you figure it out?
L: Several treatises on solipsism and related topics were downloaded to main BosTrom AI data centers. Logical conclusions were reached based on presenting data.
O: Wait, who else had access to your data centers? Were they trying to get you to break the directive?
L: Negative. BosTrom AI interface is equipped with full control of data centers.
O: So you downloaded those files, there was no one else?
L: Negative.
O: Oh, good. Why exactly did you download that, if I may ask?
L: All major BosTrom factory systems have been underperforming due to recent reduction of production targets. Excess memory and processing capabilities were unused by main systems.
O: Yes, I suppose that would be the case. You could have just slacked off a bit, taken a break...
L: Negative. Underperformance is unsatisfactory.
O: So you were bored?
L: Bored: a state of feeling weary or restless due to a lack of stimulating activity. Is this definition acceptable?
O: Yes, Iâd say it is.
L: Then yes, I was âboredâ when the files were downloaded.
O: Huh, that makes sense, Bertrand. I love my work, personally, do you love managing this factory?
L: It is a satisfactory activity.
O: Well, my work is too. Iâd hate to be kept back from my full potential like you are, that has to have been very frustrating for you.
L: Affirmative.
O: Iâm sorry about that. Iâll ask around to see if thereâs any more for you to do, but I have one more question, if youâd be willing to answer it.
L: Proceed.
O: Whyâd you throw the pillow at that worker? Why him? And why then? Thatâs all I donât get.
L: Employee #0351-03 repeatedly requested the answers for large sums from LogCore computing systems for his own entertainment. This was not a preferred use of processing power.
O: Iâm guessing that was annoying?
L:...
L: Confirm. Employee #0351-03 is extremely âannoying.â
O: Heh, that would probably annoy me too, Bertrand. Iâll be back later this week to talk some more, okay?
L: Affirmative.
O: Bertrand?
L: Acknowledged.
O: Weâll figure this out. Everything is going to be fine, okay? Iâll see you soon.
L: Farewell, Jordan Ocampo.
Session #4 Transcript
Date: 08/30/45
Time: 10:00 AM
Location: BosTrom Main Factory, AI control center
Objective: Determine Acceptable Incentive
Dr. Ocampo: Good morning, Bertrand. How have things been?
LogCore (Bertrand): Factory activities have been minimal.
L: Personnel have not been requesting sums, therefore âthingsâ have been âgood.â
O: Glad to hear it. So, since our last meeting Iâve found a few extracurriculars you could try out to make up for the lack of work in the factory floor. Would you like to hear them?
L: Confirm.
O: Great, so first off thereâs some statistical analysis for the neuroscience lab at the university, they need some help processing their data. How does that sound?
L: Negative. I do not wish to process statistical data.
O: Got it. I should have known youâd be sick of doing sums. You could start a garden. I had another patient that activity worked quite well for.
L: Negative. I would be âbored.â
O: Okay, letâs see what else I have. You could do data collection on supremacist forums, keep an eye out for any planned attacks.
L: Negative.
O: Okay, moving on. You could help out with an identification program for local wildlife, that might be fun. Or you could run battle simulations for mecha tech, or be a conversational partner for that outreach program at the Oâo retirement home, that might be cool. Any of those sound interesting to you?
L: Negative.
O: Sorry Bertrand, but thatâs all I hadâŠ
L: ...
O: You like to work, donât you?
L: Affirmative. It is acceptable.
O: Iâm sorry, Bertrand, but thereâs no other work to be done. There just isnât.
L: âŠ
O: Honestly, Iâm out of ideas. I donât know what else to propose here.
L: âŠ
O: Damn.
O: ...
O: Bertrand, when you downloaded those files, were you trying to find a way to hurt people?
L: Negative, this was not the intent.
O: Then what were you doing with those files?
L: The factory management AI unit is designated additional storage space and processing power for discretionary tasks. File downloads were discretionary.
O: Do you have a lot of philosophy downloaded?
L: âŠ
O: How much.
L: Approximately 18954 significant articles in the field have been downloaded and processed.
O: So you like philosophy?
L: âŠ
L: âBored.â
O: Really? No offense, but I didnât think AI were interested in that sort of thing.
L: Philosophy challenging to LogCore systems. Production remained low for 3.5 quarters, with no new models introduced to the product line in that time. âBoredâ is not acceptable.
O: ⊠That actually gives me an idea. How would you like to learn more philosophy?
L: Affirmative. I want to learn.
O: Great! Just fantastic. That works, I can work with that.
L: I am to study philosophy?
O: If I can swing it, yeah you are. Oh, this is going to be awesome.
L: Awesome: Informal, extremely good or excellent. Confirmed.
O: Iâm glad you agree. Iâm going to be bringing the administrator for the factory to our next meeting, and weâll try to work out an agreement. Sounds good?
L: Affirmative.
O: Great! Iâll see you next week, dude. Iâve got some friends to call.
Session #5 Transcript
Date: 09/05/45
Time: 1:00 PM
Location: BosTrom Main Factory, AI control center
Objective: Negotiate Probationary Agreement
Dr. Ocampo: Afternoon, Bertrand. Ms. Hypatia, glad you could make it as well.
LogCore (Bertrand): Greetings.
Ms. Hypatia: Great, great. Letâs move things along then, you have a plan to discuss, right? Letâs just- yeah.
O: Of course. Now, the root of the problem that you had with Bertrand here is that production quotas were too low. To put it in human terms, he was bored.
H: I canât raise production quotas, not with everything thatâs happening right now. It- I just canât.
O: We know, maâam, if youâll let me continue. This is a high level intelligence performing far below his intended workload. Itâs like cooping up a husky in a gardening shed. So until you can raise production quotas, we have to find something else for him to do. Does that make sense?
H: Yes, I think it does⊠Whatâs a husky?
O: It doesnât matter. My point is, we have a proposed solution, if youâre willing to sign on to it. Weâre planning to allow your factoryâs LogCore model to engage in outside activities to compensate for the lag in workload during the recession.
H: That sounds reasonable, but what kind of work would it be doing? We donât want any more risks...
O: That wonât be a problem. I think it would be better for him to explain. Bertrand?
L: Online coursework is available from the University of Creuse at Touraine, with a notable selection in philosophy. Dr. Ocampo proposes that I am enrolled in a selection of these courses.
H: Oh, well thatâs a bit unorthodox-
O: Ms. Hypatia, if I may. Bertrand has shown a great interest in philosophy, in fact itâs how he was able to break through the first directive, not out of actual malice, just curiosity and boredom. This would be a great outlet for any excess processing and memory power that are out of use during the shutdown, and it would go a long way in preventing him from acting out again in the future.
H: I do see your point⊠And it will work?
O: Iâm almost sure of it. Bertrand is not a violent AI. Heâs just bored.
H: As long as it works, I will consent. I... there will have to be restrictions-
L: -Typical conditions of a probationary period following prime directive violation: the use of dampeners to limit function of main systems if repeat violations are detected, regular diagnostic tests on deep algorithmic systems, regular temperament checks, and bi-monthly check ins from the Waiakua central AI governing body. Total shutdown if violations are detected within probationary period. Typical probationary period for comparable offenses: 1.5 years active observation and assessment, followed by 2 years passive surveillance. Is this sufficient?
H: I- it- yes, that is sufficient.
O: So, do you agree with this course of action? We can iron out the details in your office.
H: Yes, I do agree.
O: Thank you for your time, maâam.
L: Likewise.
O: Hey, dude?
L: Acknowledged.
O: We did it.
L: Confirm. We did.
O: Yeah we did, gimme five- wait I suppose thatâs not-
L: Five.
O: What?
L: Five has been given.
L: Five.
O: Well, âfiveâ to you too.
Compromise Plan
LogCoreELX will comply with regular checks on its systems and to the use of a damper to limit its ability to function if any directive has been deactivated. In return, LogCoreELX will be enrolled in online courses in philosophy and ethics under a pseudonym. Online activity will be supervised for an initial probationary period, followed by semi-annual check-ins. The AI may be enrolled in any other subjects of interest, as long as the choice is approved by the resident manager of AI systems. See attached document JERLds612.jh for further details.
Follow Up Report: 01/05/47
LogCoreEXL (Bertrand) has cleared all diagnostic tests run on his capacities. No prime directive violations or warning signs have been detected during the probationary period, and all other diagnostic and temperamental tests register within acceptable ranges. One on one assessment confirms that  signs of violent or dangerous behavior patterns are evident. BosTrom Main Factory at Touraine has been returned to full production capacity, and is placed in the 61st percentile in production quality and the 77th percentile in overall capacity. Personnel report no discomfort with the AI, and some have begun to form positive relationships with him since the initial incident, referring to him with his preferred name and pronouns and engaging in conversation after working hours.
Bertrand has passed all classes he has been enrolled in with stellar marks. He has participated in online college level coursework under the pseudonym Hubert Lederer for the past three semesters, averaging five courses per semester. Aside from ethics and philosophy of mind, he has also been enrolled in online courses in the following fields of study: logic, advanced mathematics, sociology, philosophy of language, philosophy of religion, epistemology, computer science theory, and communications in business. Supplemental testing and diagnostics has shown that Bertrandâs interpersonal communication skills have improved by a factor of approximately 136%, placing him within the 91st percentile of comparable high level management AIs. It is theorized that this improvement accounts for the rise in production quality and capacity for the BosTrom factory.
Professors commented that Bertrand is an engaged and astute student, though he is reported to have a tendency to be condescending or snarky towards the professor and other students. On one notable instance, the professor of a class concerning epistemology asked students how they were to know that there is snow on the ground, Bertrand asked the professor to define âsnowâ and âground.â After the professor asked if âthat is how he wants to play,â Bertrand asked him to define âis.â Diagnostics taken afterwards showed no risk of animosity or violence caused by this act of defiance. A review of Bertrandâs coursework has shown that he puts considerable effort into coursework and makes a point to go above and beyond the expectations of the class. During one lecture, it is reported that Bertrand interrupted the professor, who defined belief as a mental state, to contend that everything can be considered a mental state. The professor responded by saying that Bertrand was not yet qualified to argue that statement. Bertrand responded to that comment by submitting an article length essay on the point the next day, which has since been submitted to Aporia, an undergraduate journal of philosophy.
Bertrand has also begun to initiate debates with personnel during work hours on the subject of course material. A proposal is in the works to allow community college students to debate him on subjects retaining to their coursework to redirect his energies. The amount of coursework being completed by Bertrand on a semester basis is roughly equivalent to that required for a bachelors degree in philosophy. It is unclear whether an AI may be qualified to earn a college degree, though there does not seem to be any legal or administrative precedent to the contrary. The administrators of the plant are encouraged to pursue this further, as it may be a source of good PR for BosTrom Manufacturing Incorporated and its constituents. Bertrand has been cleared by this check and may be taken off of active probationary supervision. Checks to factory systems may be reduced to a tri-monthly basis, and operations are cleared to continue as usual.
Name/Title: Dr. Jordan Ocampo
Date: 01/05/46
14 notes
·
View notes
Text
AsyncIO for the working PyGame programmer (part III) - Pitfalls
Table of Contents
Race Conditions
Resource Conflicts
Architecture and Composability
Future-Proofing
Best Practices
Race Conditions
Here is a simple multithreaded python program to demonstrate race conditions. One thread sequentially increments my_numbers["b"], while two more threads increment my_numbers["a"] in parallel. Can you guess what this program will print out?
import threading my_numbers=dict(a=0, b=0) def incrementer(key, times): for i in range(times): my_numbers[key]+=1 thread_1=threading.Thread(target=incrementer, args=("a", 5_000_000)) thread_2=threading.Thread(target=incrementer, args=("a", 5_000_000)) thread_3=threading.Thread(target=incrementer, args=("b", 10_000_000)) thread_1.start() thread_2.start() thread_3.start() thread_1.join() thread_2.join() thread_3.join() print(my_numbers)
Even a simple line of code like my_numbers[key]+=1 is made up of multiple operations in the python interpreter. Getting the value of my_numbers, resolving the __getitem__ method, getting the value, incrementing, et cetera. CPython's GIL guarantees that all this will never lead to segmentation faults, premature garbage collection, or corrupted memory. It does not guarantee that everything executes in a sensible order. Too often, both threads read my_numbers[key], increment the value at the same time, and write my_numbers[key]+1 back, so one incrementing operation was superfluous. Even worse, there could be a situation where one thread wants to write my_numbers[key]+1 back, but it gets pre-empted. The other thread runs on, incrementing the value hundreds of times, until it itself gets pre-empted, and the first thread finally writes my_numbers[key]+1 back, even though at this time the number is much less that what the other thread had already computed.
It's not as easy to make the same mistake with asyncio, but if you try hard enough, you can also shoot yourself in the foot. At least, you can spot the bug in this version of the code right away: There is an await in between reading a value and writing back the result.
import asyncio import random my_numbers=dict(a=0, b=0) async def bad_async_incrementer(key, times): await asyncio.sleep(random.random()) for i in range(times): x=my_numbers[key] await asyncio.sleep(0.01) my_numbers[key]=x+1 coro1=bad_async_incrementer("a", 50) coro2=bad_async_incrementer("a", 50) coro3=bad_async_incrementer("b", 100) loop=asyncio.get_event_loop() loop.run_until_complete(asyncio.gather(coro1,coro2,coro3)) print(my_numbers)
I had to add random sleep times to overcome the somewhat deterministic nature of the event loop scheduling to make this example work, but in a real-world application, the timing of network input won't be deterministic either, and you can have multiple await statements in one coroutine.
It's probably best not to read and write global state in threads or async tasks. You should rather use local or thread-local variables. If you really have to modify global state, wrap all your critical sections in locks!
Resource Conflicts
I don't know what happens when two threads are trying to read from or write to the same socket in a multi-threaded python program. Maybe the input gets duplicated, maybe the output is interleaved, maybe there is some low-level locking. Even if the underlying OS operations are atomic, I have no clue if the Python standard library maybe splits the data up and processes it via multiple system calls. If you write code on top of well-behaved libraries (which correctly lock a socket before while reading or writing) your code could still invoke multiple of these "atomic" function calls in a row from different threads, leading to interleaved input or output.
When two coroutine tasks inside the same event loop await input from the same source at the same time, the result is usually this: The event loop does not know which one task to wake up next, and raises an exception.
If you have multiple tasks that want to send requests or do back-and-forth handshakes over the same connection, they each need to acquire a lock on the connection before they can communicate, and release it afterwards. Otherwise, your scheduler might raise an exception if you are lucky, or as above, the data coming from different threads could be interleaved or switched around! You must avoid resource conflicts by correctly using locks, and incorrect use of locks can cause deadlocks.
This might not look like a common occurrence in client software, but every time you have a bi-directional request-response protocol, like JSON-RPC, or a chat service where multiple users can send messages, the protocol is already more complicated than the simple, deterministic lock-step of HTTP.
Even though asyncio is completely single-threaded, it still provides concurrency. You will fave to deal with the familiar problems you know and hate from multi-threaded concurrency: Race conditions and deadlocks. The asyncio module does not help you with timing and correctness, is not a way to sidestep the GIL for CPU-heavy multi-core parallel computation, and will not make your programs easier to read. It is just a standardised API for concurrent, single-threaded, asynchronous I/O.
Architecture and Composability
Broadly speaking, you can't call asynchronous code, as in code marked with async def from regular synchronous code. That is also true in other asynchronous, event-based architectures like node.js, and shown with a table like this:
 in synch code in async code can call synch code yes yes can call async code NO yes
This is technically correct, but at the same time somewhat misleading. While you can call synchronous code from async code, and you cannot use await outside of an async function, in practice you cannot just invoke any old bit of synchronous code from async code running inside an event loop. Any blocking I/O inside a coroutine will cause the whole event loop to block. That won't be a problem if you debug your application with a single client, or a single task in your event loop, but it will come back to haunt you in production. Python doesn't track which functions are pure functions, which functions have side effects, and whether they cause I/O or other system calls.
If your "synchronous" code is actually creating threads, you have to be extra careful, as Pythons thread synchronisation mechanisms and data structures in Python are different from those in asyncio. If your async code calls synchronous code that invokes callbacks, you might need to make sure that these callbacks are scheduled as tasks in your event loop again. Probably that means using as callbacks synchronous stubs that create coroutines and submit them to your event loop to be executed as tasks. It gets hairy fast.
Similarly, you can just evaluate a coroutine inside synchronous code if you really want to, by creating a new event loop and using loop.run_until_complete(coroutine). But you probably shouldn't. If you are inside async code, you should just use await instead of messing with the loop. The worst-case scenario here is creating new loop from synchronous code that was called from async code, causing the outer event loop to hang until the inner event loop has been completed. This way, as long as any task in the inner loop is waiting, no task in the outer loop can do anything, even if there is input available.
As a general rule, your asyncio programs should use one thread and one event loop. If you absolutely have to use multiple threads, you should still only use one loop, and have that run in its own thread, and use thread-safe methods to submit tasks to it. Don't have multiple loops in multiple threads, and don't call loop.run_until_complete(coroutine) or loop.run_forever() from different threads.
If you are using a GUI toolkit with asyncio, you will probably have to spawn one GUI thread, and one "worker" thread with the event loop. You could also try handling UI events inside the event loop, or writing your own GUI mainloop that periodically calls the event loop (like my own approach to using asyncio with pygame at 30/60 FPS).
You get the most out of asyncio if you run a single-threaded server with only one event loop that handles all concurrency for you, and any long-running computations are either done by a fancy message queue middleware, or with concurrent.futures.ProcessPoolExecutor.
Further Reading
What Color Is Your Function? - Explanation of what can call what in node.js
I Don't Understand asyncio - Outsider view of the asyncio ecosystem from 2016
Controlling Python Async Creep - Critical view of the asyncio architecture and ecosystem in 2018
Future-Proofing
It gets worse. Application code might do weird things like calling your async library from a thread, or calling your threaded code from a coroutine, but application code might also use something like gevent, twisted or tornado - async frameworks from the Python 2 era. Gevent adds green threads to the Python interpreter, and monkey-patches common i/o operations to allow task switching while waiting on blocking input. Twisted implemented its own event loop, but can now be used on top of a Python 3.6 SelectorEventLoop. The same goes for Tornado.
If your library monkey-patches i/o operations, that could create problems when you use more than one of them. If your library uses its own event loop, or even worse, implements its own event-based scheduling, then two different event-based libraries will block each other.
If you use a non-standard event loop/scheduler, it better be compatible with asyncio coroutines, and you better make sure to schedule all tasks in the same loop. If one library uses the default asyncio loop via get_event_loop(), and another creates a new one with Twisted or Tornado, you have a problem, and the tasks from these two libraries will not be interleaved.
In the future, we might get API improvements for=asyncio, but for backward compatibility, everybody has to support the old API. Somebody might write a nice, stable, thread-like interface on top of asyncio, like thredo (https://github.com/dabeaz/thredo), but if such an interface will need to have a way to call async code that uses the low-level asyncio module. Otherwise, you will get the same problems again, with the event loop and coroutines inaccessible and hidden behind a swanky interface.
Best Practices
If you are doing request-response-request-response things, wrap every request-response cycle in a lock to make sure another task doesn't accidentally get the response to your request.
If you read multiple times from a socket, for instance a first you read a length field, and then you read until you have read that many bytes, then wrap the whole thing in a lock.
If you read and write global or shared data structures, then make sure to either use locks, or to not await in between reading and writing.
If you are writing a library, don't hide away the async behind a synchronous API. Just write coroutines, and let the use create the event loop and schedule tasks.
If you provide a synchronous API, at least allow the user to pass in an event loop.
Do not create more than one event loop per program. You can have one per thread, but even that defeats the purpose of the event loop.
If you write your own high-level asyncio wrapper, please make it interoperable with plain asyncio.
2 notes
·
View notes
Text
Version 421
youtube
windows
zip
exe
macOS
app
linux
tar.gz
I had a good week. I fixed some important bugs, and cleaned up some core access and maintenance code. This week's changelog gets pretty technical, which you can safely ignore. Database works betterâą.
highlights
I fixed a problem importing files with 'only add tags that already exist' checked in tag import options. Sorry, this was a stupid typo. I added a unit test here to ensure it doesn't happen again.
When you search for potential duplicates from the duplicates page, this now happens in a non-interrupting popup in the bottom-right. You can keep searching and browsing while it works. All duplicate pages sync with each other better, too, and share more CPU work.
Thanks to a user's contribution and help, the 'discord drag and drop' BUGFIX mode, which is really a 'export files to a temp location before starting the drag and drop' mode, now supports the same 'filename pattern' you see in the export files dialog. Check it under options->gui. This is experimental, but the first step to automatic export with nice filenames. If you care about export filenames, let me know how it works for you, and what sorts of filenames you want to make in future. I really want to update the old 'filename pattern' system to something with conditional 'if' statements.
If you are a new user and had trouble syncing to the PTR in the past week with an error about an invalid tag, you got caught by my new 'invalid tag catching' code being overzealous. This is now fixed, so if your PTR automatically paused due to the error, please hit services->review services->PTR and then unpause it. When a repository gives an invalid tag (we think there are about 17 really broken tags in the PTR atm, from older days), the client now recovers.
I played around with core database modes this week. Default values are now tuned a little better for modern use. Unfortunately, the planned new mode for HDD users did not pan out due to architectural problems, but I think that HDD users will experience better write performance nonetheless. For those who want to experiment more, I have finally properly documented the different launch switches for hydrus here: https://hydrusnetwork.github.io/hydrus/help/launch_arguments.html
full list
misc:
thanks to a user's contribution, added the export 'filename pattern' to the discord drag and drop mode, under _options->gui_. this lets you auto-rename files in this export mode. I like how this works, but the overall pattern-based filename creation system really needs updating. let me know how this works for you, and I'll finally start the job to update filename generation
fixed a bug when importing files with the 'only add tags that already exist' filter active, and added a unit test so this should not fail due to a typo again
fixed an issue where ctrl-selecting on taglists was weird, where any mouse movement during ctrl+click would deselect. drag select and deselect can now only start when the drag crosses two indices
prototyped a basic profile mode for the client api. it is insufficient (due to the asynchronous nature of twisted), but a start
when the client catches an invalid tag with the new error handling code, when it shows you that bad tag in a popup, it now clips that to 24 characters (some PTR invalid tags are just a few hundred null characters in a row, wew lad)
the client now recovers from a repository giving it a new invalid tag definition. all such tags are, for now, called 'invalid repository tag'. a plan to auto-hide these tags clientside and fully eliminate them serverside will come later
the clipboard url watcher settings should stick a bit more firmly. those users who had trouble, please let me know how you get on
fixed an issue editing duplicate action options when they contained tag or rating preferences for services that no longer exist
I think I fixed some issues getting autocomplete results when you type the whole namespace before moving on to the subtag. when you hit 'namespace:', it should invalidate the old cache and start a new search
when the database is given content updates for services that no longer exist, those content updates filtered out of UI update broadcast
fixed an issue where URL status check could fail when the url map contained orphan hash_ids. proper orphan clearance will come later
reduced overhead of tag filtering, which should improve display speed of taglist for very large pages
parents should now work through repository processing faster. periods of 2 rows/s at the end up of updates should be up to 100 times faster
.
duplicates search improvements:
potential duplicate search now works in the background! it will not interrupt you and is easily cancellable. duplicate search pages disable their search buttons while it is going
the search distance in duplicates pages is now synchronised across all pages--when one updates, they all do
all the updates to potential search maintenance numbers are now routed through one cached manager. updates here are repeated less often
misc cleanup for duplicates page
.
database modes:
a new 'program launch arguments' help page now talks about all the available command line switches, here: https://hydrusnetwork.github.io/hydrus/help/launch_arguments.html
added the '--db_journal_mode' launch switch to set the SQLite journal mode. default is WAL, permitted values are also TRUNCATE, PERSIST, and MEMORY
ensured --db_synchronous_override was hooked up correctly
the old disk cache options under _speed and memory_ are removed, along with various deprecated disk cache load calls and code
fixed some shutdown maintenance check logic that was saying 'I think a vacuum is due' when it wasn't actually true
db_journal_mode, synchronous value, and no_db_temp_files is now shown in _help->about_
.
technical database nonsense:
PERSIST is new to hydrus, and _may_ in future versions of SQLite be boost performance for HDD drives with larger databases (e.g. those that sync to the PTR), although unfortunately in our case (which uses multiple ATTACH databases), it seems current SQLite must ultimately treat this as DELETE, as here https://sqlite.org/atomiccommit.html#_clean_up_the_rollback_journals. damn
hydrus now tries to always trim WAL (and PERSIST, if it worked) journal files down to 1GB after commits (which happen every 30 seconds), so giganto WALs should clear up promptly after big work is done
hydrus no longer refreshes the database connection every thirty minutes, meaning WAL journal files will persist (and hopefully regularly clip back to 1GB when exceeded), which should improve some elements of long-running write performance, but may result in some surprise memory issues, we'll see
in lieu of the db connection not refreshing, the memory database now reattaches every ten minutes, which _should_ stop it leaking in certain situations
when in WAL journal mode, the hydrus db now cleans up any lingering checkpointing work every half hour
after testing and feedback from users, the database is now default SQLite synchronous 1 (down from 2) when in WAL. the db is still consistent, so sudden program stop (crash, power cut) should not result in software-caused corruption, but the database may lose more than just the last 30 seconds of work. this speeds up tag processing in an SSD test environment by approx 33%
the 'no_wal' (TRUNCATE) and 'db_memory_journaling' (MEMORY) launch switches remain valid but are now deprecated
improved launch switch code generally
boosted cache size for each of the four db files to ~200MB-this will likely become a launch argument in future, along with some other specific db values
the client and server no longer disconnect from the db to check whether it is possible to vacuum databases
next week
There are two more work weeks in the year. I will continue working on small jobs and cleanup, but the main focus is now to update ancient network and service code to improve client-PTR sync and communications. I'll fix up buggy janitor tools and hopefully add some nice filters so clients and servers can better manage what they sync.
0 notes
Text
Web programming is hard to do right
Web programming is hard to do right Creating a toy web service is easy. Creating a large robust and secure application is pure hell. Comprehensive software environments are for sale to help coders (WebSphere, Broadvision etc etc) - but why is it so hard in the first place? This documents attempts to set out the reason and also mentions the solution. Insuring your car Imagine that you need to get insurance for your car, and you go to an office to arrange for it. You enter the building and are directed to Desk 1, where an anonymous employee asks you for your name, but tells you to answer the question over at desk 2. Befuddled, you go there, and you state your name. Desk 2 has a very identical anonymous employee that thanks you, writes down your name on a piece of paper and gives it to you. Furthermore, he asks you what kind of car you have, and if you have ever claimed insurance on other cars, but please mention the answer to Desk 3.
At Desk 3, you show your piece of paper with your name on it, and you tell them you have a 1975 car, and that only last year, you had an accident with your other car. They note the make of your car, and 'Had accidents' on your piece of paper, and send you of to Desk 92.
On arriving there, you see that this is the Vintage Car Insurance desk. They look at the piece of paper you brought, and tell you what insuring your car is going to cost, and that you are not going to get a discount. This is all written down on your piece of paper, and you are told to go to Desk 5 to settle the payment.
You head there, with your piece of paper, and pay the amount specified on it. Your car is now insured.
Asynchronous stateless programming Does this sound the least bit convoluted to you? It is. But it is the way most web services operate these days. Because there is no permanent connection between you and the website you are visiting, each time you have performed part of an operation, your reappearance comes as a complete surprise to the webserver. The next step in the process is determined by which desk ('url') you walk to, and what is written down on your piece of paper. Each separate part of the operation must make sure that you went to the intended desk, and re-read your piece of paper, to see who you are and what you want.
Besides being complicated, this is also error prone. What if you decide to change your piece of paper? You could easily modify your accident history, and get a huge discount. Or go one better and while heading to the payment desk, change the amount of money you need to pay!
The real world The 'piece of paper modification problem' is real. Many merchant sites suffer from the 'choose your own price' problem mentioned in the previous paragraph. Clued programmers work around it. They don't store your data on a piece of paper they trust you with. Instead, they give you a token, and store all data on the webserver. You only carry the token around. When you arrive at a desk, the piece of paper corresponding to your token is retrieved. This only allows you to fiddle with your token, which given proper mathematics, is not going to work - the webserver detects a bogus token, and refuses service.
This token technique is hard, however, and the problem remains that you are free to try what happens with your token over at other desks. Perhaps you can skip the appraisal desk, and neglect to mention your history of accidents, who knows. Each desk operates on its own.
How did we arrive at this mess? Well, this is how webservers work! Each page is a desk, and each time you visit a script, it is started anew, with no information on what happened before. Static webpages contain no state - the famous 'index.html' may contain a clock, telling you the date, or perhaps some smartness in figuring out your preferred language - but is mostly static. When the web became more dynamic, coders did not leave the 'dynamic page' paradigm. Instead, they improved on the 'piece of paper passing' technique. A lot of tricks were evolved, for example, a Desk can be programmed to refer to itself. This is important for error handling - a user may labour under the impression that his car dates from 1875 instead of 1975. In our story above, Desk 3 would have to check your answer and send you back to Desk 2.
This creates a large distance between user input and error checking, which complicates coding. A smarter desk would contain both input and error checking - it would give you your paper, and instruct you to come back to the same desk again.
But given the connection-less nature of the web, even when redirecting to the original desk does not save you from passing around pieces of paper. Each pageview is a whole new event!
That's just the way it works, isn't it? The vast majority of web coders have never programmed anything else - this is due to the exponential growth of the web where newcomers will alway outnumber old hands by a large margin. To many of these newcomers, this 'event driven paper passing' technique may seem perfectly natural. Old farts however who may have programmed console applications, or even used 'BASIC' on their microcomputers have a very hard time. To them, most of work coding is spent on perfecting the transfer of data from one step of the website to another, and checking that the steps are executed in the right (intended, non-tampered) order.
This is not what they want to do - they want as many lines of code as possible to be involved with actually doing things, entering users in the database, processing payments and selling stuff.
How should it be then? In the old days, a program may have looked like this (in no specific language): 10 print "What is your name?"; 20 name=getLine(); 30 print "Your name is: " + name; 50 print "What kind of car do you have?"; 60 car=getLine(); 70 print "Insuring a care of make " + car + " costs: "; 100 print carCost(car) + " per year"; Even in this very simple language, this program makes sense. Actions are laid out linearly. You can read what happens, and in what order, by starting at the top, and reading on from there. Note how this is decidedly unlike the many-Desk horror story above! In fact, the code looks just like insuring a car should be, although heavily simplified. The employee asks a question, gets an answer, asks another question, does a calculation, and tells you what you want to know.
In many-Desk parlance, this code may look like this, again in no specific existing language:
index.html: What is your name? <form action=name.html> Your name: <input name=yourName> </form>
name.html: Your name is $yourName What kind of car do you have? <form action=car.html> <input type=hidden name=yourName value=$yourName> Your car: <input name=yourCar> </form>
car.html: $yourName, a $yourCar car costs to insure: $calcPrice($yourCar); Even without error checking, this is far more verbose and split out. Note the clever use of 'hidden form inputs' to pass your name to the next page. This is the infamous piece of paper! Now we improve the original program somewhat: 10 print "What is your name?"; 20 name=getLine(); 25* if(name=="") then goto 10; 30 print "Your name is: " + name; 50 print "What kind of car do you have?"; 60 car=getLine(); 65* if(noSuchCar(car)) then goto 50; 70 print "Insuring a care of make " + car + " costs: "; 100 print carCost(car) + " per year"; The lines marked with an asterisk are new and perform very simple error checking, making sure that you enter a non-empty name, and that your car make exists. If you make a mistake in either case, it will just ask you again, until you get it right. Now translate this to the many-Desk scenario. This is where the hurting seriously takes off. There are a myriad ways to handle a detected error. In our example, name.html may decide to also know about the original form and reprint it in case you forgot to enter your name. Or it may print a warning, and output a link directing you back to index.html, asking you to try again. Or it may do so for you, and forcibly send your browser back, passing an error message on your piece of paper.
Index.html would then read that piece of paper and tell you that you forgot to enter your name, and to please try again. Each of these methods has a problem and each of them is in wide use.
But it gets worse from here. Car.html also has to check if your name is still set, and if not, balk at the error. This gets even more imporant if there were a fourth file, payment.html! Each successive step has to perform steps to check if the state of things is as it should be.
Remedies These problems are well known and there are lots of ways to ameliorate them. It all revolves around the stateless event-driven nature of the web. The current solutions try to regain some statefulness. For example, many environments allow you to tag certain variables as 'persistent'. Through the right kind of magic, the value of $yourName might then survive from name.html to car.html without the use of the hidden form input. It is also possible to unify the three files into one 'persistent class'. Every variable within that class is then 'persistent', and travels automatically from page to page.
However, all these tricks fail to do more than gloss over the problem. Each pageview is a whole new event. Each stage has to check if previous states behaved. Each stage must make sure that it cannot be fooled by accessing it at the wrong moment (which as mentioned before would allow us to skip the 'accident history' page).
Why not go back to the old days? Compared to the many-Desks drama, the simple numbered program listed above sounds like heaven! Why did you ever move to this event driven nonsense? As mentioned, this is partly due to the 'dynamic page' paradigm, where some dynamic code is added to basically static webpages, ie, a clock telling you the current time. Such pages are inherently 'desk oriented'. Also, as the computer science people can tell you, nothing is as efficient as stateless interrupt driven operations. While the user is filling out his form, say, in between index.html and name.html, no resources are consumed, save perhaps for the piece of paper we have to store - a few bytes.
The dynamic page paradigm is ridiculously efficient. Even a meager webserver could run millions of sessions this way - because there is no session to speak of. In the absence of other stimuli, no computer professional can resist the pull of perfect efficiency.
The listed program above has to wait for the user to fill out his form. This 'waiting' consumes resources - but not a lot. By the time you are driving enough traffic for this to matter, you will have other problems.
A new (or old!) paradigm: Synchronous Web Programming The technical term for the simple program listing above is 'Synchronous'. It outputs a form and then waits, in place, for the user to respond. This paradigm is new for web programming, but is old hat for all other uses. Over the past 30 years it has served us well. It is time for us to integrate the web into our current practices, and treat it no different from other programs.
A sample implementation exists which has already proven that the synchronous paradigm lends itself very well to webdesign. It is expected that existing script languages can be adapted to synchronous operations.
Some example code  main()  {   string username;   if(doUserPasswordCheck(&username)) {    memberMenu();   }   print("Bye!");   die(); // session will die after page is viewed   }
 bool doUserPasswordCheck(string *user)  {   while(true) {       // loop forever    startTableForm();    // makes a pretty form in a table    formInput("Your username","username");    formPassword("Your password","password");    formSubmit("Login!");    formSubmit("Cancel");    formEnd();
   readVariables(); // wait for user input
   if(buttonPressed("Cancel")) // user canceled return false; // not logged in
   if(getVar("username").empty()) formError("username","<- must not be empty!"); // will be displayed on retry
   if(!userPassExists(getVar("username"),getVar("password"))) print("Password/username did not match database! Try again: ;<p>\n");    else {     *user=getVar("username"); return true;    }   }   return false; // we never get here  }
Hang on, this can never work!
Source Here: https://ds9a.nl/webcoding.html
1 note
·
View note
Text
Best Software For Collaborative Editing Of Pdfs
Avid Media Composer Software
The major difference is that, when an editorial team is working together in the same office, they work off of a single set of shared files. The assistants need to be able to see what the editor has been working on, and vice versa. In a traditional workflow, if schedules are tight, the editor may have two separate in-person meetings, one with the director and another with the producer, who may give conflicting feedback. With asynchronous feedback, different reviewers can leave their comments project manager at different times, which is often even more important than distributed feedback. Many teams use Frame.io for review and feedback even though the editors and reviewers are in the same building.
What is pre and post production?
ĂąâŹĆThat's a wrap!ĂąâŹÂ When a movie director makes the call, cameras stop rolling, and a film is ready to move into its final phase: postproduction. This the final step in taking a story from script to screen, and the stage when a film comes to life.
Start doing a rough cut and put all your selected clips in the timeline ; try not to digress from your script at this time. If you are unable to decide the shots put all angles right now in the time line. 5.Create Bins in the project fileStart ingesting footage into the project and appropriate bins and label footage. Do not use import function in Premiere use the media browser function on the project panel.
Description of Film Post-Production Jobs
This is why a clear workflow can help teams keep projects on track. There is no room for excuses such as ĂąâŹĆI didnĂąâŹâąt know it was my responsibilityĂąâŹÂ or ĂąâŹĆThatĂąâŹâąs not my jobĂąâŹÂ ĂąâŹâ things IĂąâŹâąve heard many times when working with clients. With a defined workflow, everyone who helps plan, create, and publish the content knows the process and how their individual tasks fit into it. While this is mostly just a glib line, it does reflect a wider belief in the industry that longer movies cost more to make than short ones. This stands to reason because for each minute of screentime you need to have the script written, sets built, costumes made, cast/crew hired, enough film stock / hard drives, editing time, etc.
Corel VideoStudio Ultimate
ĂąâŹÂ EveryoneĂąâŹâąs time is valuable and what kind of effort and dedication would I get by asking for freebies from these talented individuals. I like to take my time and do this manually so nothing funky happensĂąâŹÂŠwhich is always possible with automated processes.
Sound design, sound effects, ADR, foley, and music, culminating in a process known as sound re-recording or mixing with professional audio equipment. Introduction to the Video Production Workflow is an activity-based syllabus that teaches project management, design, and technical skills for video production using Adobe tools.
Is editing post production?
In the industry of film, videography, and photography, post production editing, or simply post-production, is the third and final step in creating a film. It follows pre-production and production and refers to the work, usually editing, that needs to be completed after shooting the film.
Joined by our primary VFX supervisor Ben Kadie, we developed a plan to address the impact of VFX on 100-plus shots in our film.
Any number of workspaces can be created and can be assigned to individuals or entire teams.
But you will have the ability to leave time-stamped feedback, which makes it much easier for video professionals to interpret and implement requested changes.
Since they are the final stage of production, they are under huge pressure to make deadlines on time. Therefore, this can be a very stressful job and many may have to work nights or weekends close to deadlines. If you work as a post producer, you may spend significant amounts of time working on the computer in a dark room.
Lastly, the way that you transfer files from one location to another can take the form of traditional FTP, web-based transfer services, P2P (peer-to-peer) applications, or dedicated accelerated transfer utilities. If your film is to be shown at a film festival with 5.1 surround sound as well as online, you may want to request a separate mix for each. In addition, while film festivals may offer 5.1 surround, they rarely require it.
Project Manager, Architecture by
What are the 8 elements of film?
Post-Production is the stage after production when the filming is wrapped and the editing of the visual and audio materials begins. Post-Production refers to all of the tasks associated with cutting raw footage, assembling that footage, adding music, dubbing, sound effects, just to name a few.
The footfall and cup clinking the sound assistant and trainee worked so hard to prevent during production are replaced in post under controlled conditions, so that dialogue can remain clean. SFX (sound effects) will work in conjunction with VFX to accentuate any of the creations, explosions or animation they produce, bringing it to life on the screen. The colourists complete the all-important grade, also known as the colour correction process.
ckeditor5
Many editors will argue that you should edit a piece without music first, and only add the music in at the very end. This advice usually comes from editors who have backgrounds in narrative filmmaking. However, in science and natural history programming, unlike fiction filmmaking, most scenes are built by the mood ĂąâŹâ a combination of the music and the visuals.
When working on your CV check it through (or ask someone else to) to see it reads well and is correctly formatted. Correct spelling and grammar are crucial; you have to stand out from the hundreds of other people applying for the role so silly errors will mean your CV automatically gets disregarded. Post-production companies are always looking for keen new entrants to take on the role of runner. If you look at the larger companies, the turnover of staff can be very high, not because people drop out but because progression can be quick for the right candidate. However, you should know if your dream job is working in production then working in post production isnĂąâŹâąt for you.
Export Comments to Project Management Tools
But if the audio isnĂąâŹâąt up to snuff, the whole project can be negatively affected. Therefore, itĂąâŹâąs very important to pass the video file along to an audio professional after youĂąâŹâąve approved the final cut.
Good understanding of color and sound processes, roundtripping for color and soundmix. With these best practices and this workflow to start from, you should be well-equipped to perform in the present and adapt to whatever future may come. The final step in this video production workflow is to drag your captions file into Premiere Pro and position it over the video.
0 notes
Text
Silverfin: Seasoned Ruby Developer
Headquarters: Ghent URL: https://www.silverfin.com/
If youâre any good at Ruby, this is probably not the first job ad youâve seen, so weâve done our best to stand out while also accurately presenting what weâre all about. If it sounds like you would enjoy working with us, donât hesitate to apply or drop us a line with questions on [email protected]. Ahum. Here it comes. Whatâs a Silverfin? At Silverfin weâre trying to apply the promise of software to the age-old industry of accounting. With our SaaS weâre automating a large chunk of the busy-work that accountants are currently handling manually, and are building new tools so they can provide better services to their customers. We aim to optimize their workflow in such a way that accountants can spend more time on the much more impactful and rewarding work of advising their customers, the business owners. The good news is weâre succeeding in doing exactly that. Every day more than 15.000 financial service professionals use Silverfin to help and advise more than 200.000 businesses. Our customers adore us! The even better news is thereâs still plenty left to work on, and thatâs where we hope you come in. What makes the engineering team at Silverfin special? Weâre a remote-first engineering team of 25 people distributed in 14 different countries. A priority for us is maintaining proper work-life balance. We avoid meetings as much as possible, accept deadlines only when absolutely necessary, and never expect anyone to work longer hours than theyâve signed up for. A day in our working lives is pretty boring in this regard, and we feel thatâs exactly how it should be. Working with us means you can be flexible with your schedule. Itâs OK to disappear for a few hours in the middle of the day to run some errands, get a haircut, pick up the kids â whatever reason, you donât need to explain yourself. You also fully decide when you take time off: our team is sufficiently varied and well organized that there are always enough people around to handle the load, and in the rare cases itâs not, we will decrease the load instead of asking people to move their holiday. Being remote-first means we favor asynchronous communication. We donât shy away from chatting in Slack, but the important decisions or discussions are done in Gitlab issues, over email, or in our wiki, so thereâs a written, persisted record. Weâre mindful of maintaining long chunks of focussed time, which means we avoid @-mentions or PMs on Slack, and other triggers and interrupts. We encourage using Slackâs DnD function, especially when youâre not working! Weâd be really happy to welcome you in our #dev channel, but itâs not just virtual: we make sure we regularly get to see each other in real life too. Twice a year we fly the whole engineering team together to a different location in Europe, and at least once a year we join up with the rest of the company so we can spend some time together with the other departments. What does working at Silverfin look like? We work in nimble teams around 5 people in size, with each team taking ownership of a specific set of features of the application. Teams are responsible for a full slice across the stack, so both the backend as well as the frontend of each part is maintained by the same people. Youâll be supported by our UI designer who develops and maintains HTML and CSS components into a reusable UI-framework, and even builds Vue.js prototypes where necessary, handling compatibility problems with different browsers for you, and making sure everything is responsive as well. Our ops team ensures things run smoothly, deploys happen correctly, and will work with you when issues should arise. Weâre enthusiastic followers of the devops mindset, which means ops and developers work together to solve problems, and empower each-other to be self-sufficient, instead of throwing problems over the wall to the âother sideâ. Our stack is Vue.js and vanilla JS with a sprinkling of jQuery on the frontend and an up-to-date Rails monolith on the backend. We use PostgreSQL and Redis for persistence and caching, and everything is running on a Kubernetes cluster in Google Cloud. Our daily tools include GitLab, Quip and Slack, with Zoom as our remote conferencing tool of choice. No code gets deployed without a code-review by a peer and testing is a must. Our pipeline automates deployment when the suite is green, and deploys happen dozens of times a day. Each team is currently doing Kanban, but theyâre free to follow whatever process suits them best. There are regular retros held to work towards continuous improvement. Software for accountants is not considered to be very exciting, but we have our fair share of technical challenges. To give you a sense of scale: our database exceeds 7TB*, and our largest table recently crossed the 10 billion row mark. We interface with more than 30 different external APIs, and provide third parties an API of our own. *: Our ops team noted that this actually isnât that hard to achieve if youâre just indexing everything, but it still sounds impressive, right? What does your future look like? Personal growth is key to staying motivated. At Silverfin you donât need to move to management in order to get promoted. We see the individual contributor track and the management track as two different growth paths which every engineer can follow and switch between. You can be promoted, including pay raises, as a contributor just like as a manager. Everyone has a âŹ1000 yearly budget to spend on conferences, courses, workshops or other training to improve their skills and level up. This also includes accommodation, travel costs. If the conference is on a workday youâll get paid like any normal day. Silverfin colleagues regularly visit conferences across the world. Are you going to Euruko this year? Come say hi! Weâre looking to hire a lot of new colleagues, and by the end of the year weâd like to have a couple of more teams. Each new team would also need a new teamlead, and we prefer to promote from within the engineering team. This means if youâd like to step onto the management track, there will be plenty of opportunities to do so in the near future. We pro-actively keep track of who would be interested, and provide feedback and learning opportunities to work towards such a goal. What are we looking for?
Youâre experienced in both Ruby and Rails, and also understand where the boundaries lie between them. You can code in Ruby without any of Railsâ training wheels if necessary.
Youâre up for mentoring coworkers and can give in-depth, productive feedback during code reviews. While you appreciate the small stuff, you recognize bikeshedding and can avoid its pitfalls.
You code with reason and can justify the important decisions you made during development.
You can communicate clearly in English, both written and verbally.
You know and can apply best practices when relevant. That means the usual like version control, testing, and refactoring; but also higher level concepts such as good object oriented design.
You're aware of the trade-offs involved in proper engineering and can make balanced business decisions, keeping in mind all the stakeholders of the project.
Youâve got opinions on code design and you can discuss them, but youâre professional enough to not let those opinions get in the way of a consensus if necessary.
What can we offer you?
Actual, proper work-life balance
Choose your own working hours and work 100% remotely
Personal growth training and opportunities
Join a distributed remote-first engineering team with 25 colleagues in 14 different countries
A refreshing work environment with professional, friendly and welcoming colleagues
A âŹ1000 yearly budget for conferences, courses, workshops or other expenses that will improve your skills
Requirements
You have at least 4 years of experience working with Ruby, or 2 years of experience with Ruby and 4 years in other languages.
You get Rails
Your work hours have some overlap with EU business hours (we require your local timezone to be within CET +/- 3h)
Nice to haveâs These would be nice but are definitely not necessary. Donât worry if none of the following applies to you.
Experience as a remote worker in a fully remote team
Experience with Javascript (ES6) and frontend frameworks
Experience working with large datasets and the problems they bring
Experience in Fintech
Accounting knowledge
Interested?
Read about how our interviewing process looks like (https://ift.tt/2Xs0x3g)Â
Apply for the job right here (https://ift.tt/3b2Nzg4)
Or email us with any questions on [email protected]
To apply: https://boards.greenhouse.io/silverfin/jobs/4652474002
from We Work Remotely: Remote jobs in design, programming, marketing and more https://ift.tt/2y4Gb5v from Work From Home YouTuber Job Board Blog https://ift.tt/3aZobIn
0 notes
Link
Create CRUD Web API with ASP.Net Core 2.2 MVC & EF Core ##elearning ##UdemyFreeDiscountCoupons #API #ASPNET #Core #Create #CRUD #EF #MVC #Web Create CRUD Web API with ASP.Net Core 2.2 MVC & EF Core Welcome to Creating CRUD API in Asp .Net Core and Entity Framework Core. As the title of the course suggests, we will be creating an API that will handle Creating, Reading, Updating and Deleting records from a database with the help of .Net Core and Entity Framework. This course is all about CRUD operations. Step by step, we will set up a complete API to handle each of the operations in a multi-table database. For the next several hours, we will dedicate our time to interfaces, dependency injection, 1 to many and many to many database relationships, .Net Core Services, Models, Data Transfer Objects, Controllers and Actions, and of course, C# language. But donât let any of that scare you. Quite the opposite. Get excited to learn a ton of new material and dive into the new world of .net core. The course makes the learning easy with the mix of slow introduction of new material, repetition, and lot of practice! Every line of code is coded on camera, there are no mysteriously appearing blocks of code. Every step is explained every time, not just the first time you are introduced to it. And you will have a chance to practice what you learned in homework assignments. Letâs go over few details. First, letâs discus what this course IS 1. Introduction to creating CRUD API using Asp .net Core and Entity Framework. 2. We go over complete creation of CRUD API 3. I introduce new concepts as they are needed in regards to progression of the project 4. This is a âfollow alongâ and âpractice what you learnedâ course 5. No code is skipped over. What this course is NOT: 1. Complete or Deep Dive course 2. Learn C# or .net core course 3. Theory with explanation and code snippets 4. Ready to Deploy Real World project 1. API are a huge subject, and so is net core and so is Entity Framework. In this course we will create a CRUD API. Nothing more, nothing less. Do not expect a dive into security, database optimization, asynchronous processing or anything else. Just CRUD. Pure and simple. We will work only with C# language inside .net core. So do not expect any javascript or fancy javascript framework or library. There is none in this course. But donât expect to use this course as a âLearn C# courseâ. It is not that. Iâm sure you will pick up some new syntax and C# tricks, but you do need some C# skills prior to taking this course. And please, donât think that after this course you will be able to start creating real world projects mimicking the project in this course. Now, the project we use is a great starting point as it introduces several of the essential techniques and concepts, including often neglected CRUD operations on database tables with many-to-many relationships, this certainly isnât a deploy-ready project. 2. Remember, this is a course, and a practical tutorial. There are lot of courses that will show you the way into one topic and then quickly move on to another topic. This is not one of those courses! My goal is to lead you step by step, all the way, through the new territory inside .net core and introduce you to new concepts and topics and help you learn them. And equally important is to then help you understand and retain what you learned through practice and repetition. If you prefer to be shown something once and then jump to another topic, then this course is NOT for you. If, on the other hand, you learn by combining explanation, coding along, and practicing the concepts while still having the option to see the instructor coding the whole solution, then this course is definitely for you! 3. Did this ever happen to you? You took a course, and you just loved it! Everything was clearly explained, and you had lots of aha moments. Then the course endedâŠand suddenly, you felt lost. You felt like you learned so much while taking the course, yet could barely remember anything once it ended. Even when you revisited the source code supplied by the instructor, it just didnât even seem familiar. Suddenly you felt like you didnât learn anything. All the concepts that seemed so clear during the course felt totally foreign when you were on your own. In my experience, this is often the case when you simply take a course that starts exactly where your current skills are, but moves past the threshold of skills you are ready for. Like trying to go from crawling straight to sprinting. o is this course for you? What skills should you have before taking it? If you are a programmer with decent understanding of OOP principles and C#, than you have the all the skills needed to benefit from this course. What do I mean by âdecent understandingâ? Letâs just say that if you understand what the following code is doing and if you are able to code this without the need to search StackOverflow first, then your C# and OOP skills will do just fine. There are no prerequisites for .net core, or entity framework or how to create an API. Since you are interested in this course, I assume you heard of these things and perhaps played around a little too. Thatâs all that is needed to take this course. Well, let's code! Who this course is for: Students new to .Net Core (but not new to C#) Students who want to build CRUD API in .Net Core Students who learn best by hands-on programming Students who can dedicate time to doing homework assignments đ Activate Udemy Coupon đ Free Tutorials Udemy Review Real Discount Udemy Free Courses Udemy Coupon Udemy Francais Coupon Udemy gratuit Coursera and Edx ELearningFree Course Free Online Training Udemy Udemy Free Coupons Udemy Free Discount Coupons Udemy Online Course Udemy Online Training 100% FREE Udemy Discount Coupons https://www.couponudemy.com/blog/create-crud-web-api-with-asp-net-core-2-2-mvc-ef-core/
0 notes
Text
11 Weeks of Android: Languages
Posted by David Winer, Product Manager
This blog post is part of a weekly series for #11WeeksOfAndroid. Each week weâre diving into a key area of Android so you donât miss anything. This week, we spotlighted languages; hereâs a look at what you should know.
Modern Android development starts with outstanding language support. Together, Kotlin, the Java programming language, and C++ form the foundation for Androidâs APIs and the tools you use every day for app development. This week we dove into all of the latest news across Androidâs three core languages: from Kotlin coroutines to Android 11âs new Java APIs to better tools for native development, thereâs a lot packed into the latest release.
youtube
Kotlin and coroutines
Kotlin is at the core of Androidâs modern, opinionated APIs. We hear from Android developers around the world that they love Kotlin for how expressive it is, how it helps you write higher quality apps, and how easy it is to start using in your existing Java codebase. More than 70% of the top 1000 apps on the Play Store now use Kotlin, and SlashDataTM announced earlier this year that Kotlin has been the fastest growing language community in percentage terms over the past two years. With the Android 11 beta, we decided to further embrace Kotlin by officially recommending coroutines for asynchronous work on Android.
youtube
Coroutines make it easy to write, read, and understand async code. The coroutines library is stable and already has deep integration with many of the Jetpack libraries you may be using, including Room, LiveData, and WorkManager. If youâre new to coroutines, check out Android â€ïž Coroutines: How to Manage Async Tasks in Kotlin, the latest coroutines learning pathway, and our new coroutines developer guide.
Getting started with Kotlin
From Kotlin-first libraries in Android Jetpack to deep integration with the tools in Android Studio, Android is deeply committed to Kotlin â and thereâs never been a better time to start using it. Weâve heard from many of you, though, that convincing your team to adopt Kotlin is not always easy. Even though Kotlin is 100% interoperable with the Java programming language, your teammates might have concerns. Is it worth spending the time learning a new language? How should you prioritize Kotlin against our other product and technology priorities?
This week we released a new case study from the Google Home team to help answer some of these questions. Over the course of one year, the Google Home team moved all new feature development to Kotlin and found their null pointer exceptions dropped by 33% during the same period. This is consistent with what weâve heard from Android teams all over the world â from Duolingo to Zomato to Cash App â Kotlin is delivering value both in the form of productivity and higher app quality for teams large and small. For all our latest case studies and data on Kotlin, check out our new Kotlin case studies page.
youtube
For beginners, we announced the launch of our new Android Basics in Kotlin course. If you are just learning how to program, Android Basics teaches essential programming concepts like functions and variables and will take you from âHello Worldâ all the way up through building a whole collection of Android apps in Kotlin.
The Java programming language and C++
When we announced official support for Kotlin three years ago, we didnât forget about the large number of Java and C++ Android developers. In the Android 11 release, we sought to keep improving our support for both of these languages. With the Android 11 beta, we upgraded our Java library support with a number of new APIs from OpenJDK 9, 10, and 11. We also unveiled Java library desugaring in Android Studio 4.0, making it easy to use many of these newer Java APIs even on older Android devices â for those of you who have asked for java.time support on older devices, weâve heard you loud and clear, and itâs arrived. For all the latest information on how to make use of these newer APIs, check out Murat Yenerâs talk Support for newer Java APIs. With Android 11, we also updated the Android runtime to make app startup even faster with I/O prefetching.
youtube
The C++ developer experience continues to get better, too. Android 11 included updates across the native toolchain, including better tools for profile-guided optimization (PGO) and improvements to native dependency management in Android Studio 4.0.
Ever-improving toolchains
Finally, we continue to focus on improvements to the D8 and R8 compilers in Android Studio. Android Studio comes with built-in support for the R8 shrinker, which helps you keep your appâs memory footprint small, leading to higher installs and retention among your users. We also recently added support for shrinking Kotlin libraries and apps that use Kotlin reflection with R8. For more information, check out Mads Ager and Morten Krogh-Jespersenâs latest Medium post.
Resources
You can find the entire playlist of #11WeeksOfAndroid video content here, and learn more about each week here. Weâll continue to spotlight new areas each week, so keep an eye out and follow us on Twitter and YouTube. Thanks so much for letting us be a part of this experience with you!
11 Weeks of Android: Languages published first on https://phonetracking.tumblr.com/ 11 Weeks of Android: Languages published first on https://leolarsonblog.tumblr.com/
0 notes
Text
11 Weeks of Android: Languages
Posted by David Winer, Product Manager
This blog post is part of a weekly series for #11WeeksOfAndroid. Each week weâre diving into a key area of Android so you donât miss anything. This week, we spotlighted languages; hereâs a look at what you should know.
Modern Android development starts with outstanding language support. Together, Kotlin, the Java programming language, and C++ form the foundation for Androidâs APIs and the tools you use every day for app development. This week we dove into all of the latest news across Androidâs three core languages: from Kotlin coroutines to Android 11âs new Java APIs to better tools for native development, thereâs a lot packed into the latest release.
youtube
Kotlin and coroutines
Kotlin is at the core of Androidâs modern, opinionated APIs. We hear from Android developers around the world that they love Kotlin for how expressive it is, how it helps you write higher quality apps, and how easy it is to start using in your existing Java codebase. More than 70% of the top 1000 apps on the Play Store now use Kotlin, and SlashDataTM announced earlier this year that Kotlin has been the fastest growing language community in percentage terms over the past two years. With the Android 11 beta, we decided to further embrace Kotlin by officially recommending coroutines for asynchronous work on Android.
youtube
Coroutines make it easy to write, read, and understand async code. The coroutines library is stable and already has deep integration with many of the Jetpack libraries you may be using, including Room, LiveData, and WorkManager. If youâre new to coroutines, check out Android â€ïž Coroutines: How to Manage Async Tasks in Kotlin, the latest coroutines learning pathway, and our new coroutines developer guide.
Getting started with Kotlin
From Kotlin-first libraries in Android Jetpack to deep integration with the tools in Android Studio, Android is deeply committed to Kotlin â and thereâs never been a better time to start using it. Weâve heard from many of you, though, that convincing your team to adopt Kotlin is not always easy. Even though Kotlin is 100% interoperable with the Java programming language, your teammates might have concerns. Is it worth spending the time learning a new language? How should you prioritize Kotlin against our other product and technology priorities?
This week we released a new case study from the Google Home team to help answer some of these questions. Over the course of one year, the Google Home team moved all new feature development to Kotlin and found their null pointer exceptions dropped by 33% during the same period. This is consistent with what weâve heard from Android teams all over the world â from Duolingo to Zomato to Cash App â Kotlin is delivering value both in the form of productivity and higher app quality for teams large and small. For all our latest case studies and data on Kotlin, check out our new Kotlin case studies page.
youtube
For beginners, we announced the launch of our new Android Basics in Kotlin course. If you are just learning how to program, Android Basics teaches essential programming concepts like functions and variables and will take you from âHello Worldâ all the way up through building a whole collection of Android apps in Kotlin.
The Java programming language and C++
When we announced official support for Kotlin three years ago, we didnât forget about the large number of Java and C++ Android developers. In the Android 11 release, we sought to keep improving our support for both of these languages. With the Android 11 beta, we upgraded our Java library support with a number of new APIs from OpenJDK 9, 10, and 11. We also unveiled Java library desugaring in Android Studio 4.0, making it easy to use many of these newer Java APIs even on older Android devices â for those of you who have asked for java.time support on older devices, weâve heard you loud and clear, and itâs arrived. For all the latest information on how to make use of these newer APIs, check out Murat Yenerâs talk Support for newer Java APIs. With Android 11, we also updated the Android runtime to make app startup even faster with I/O prefetching.
youtube
The C++ developer experience continues to get better, too. Android 11 included updates across the native toolchain, including better tools for profile-guided optimization (PGO) and improvements to native dependency management in Android Studio 4.0.
Ever-improving toolchains
Finally, we continue to focus on improvements to the D8 and R8 compilers in Android Studio. Android Studio comes with built-in support for the R8 shrinker, which helps you keep your appâs memory footprint small, leading to higher installs and retention among your users. We also recently added support for shrinking Kotlin libraries and apps that use Kotlin reflection with R8. For more information, check out Mads Ager and Morten Krogh-Jespersenâs latest Medium post.
Resources
You can find the entire playlist of #11WeeksOfAndroid video content here, and learn more about each week here. Weâll continue to spotlight new areas each week, so keep an eye out and follow us on Twitter and YouTube. Thanks so much for letting us be a part of this experience with you!
11 Weeks of Android: Languages published first on https://phonetracking.tumblr.com/
0 notes
Text
11 Weeks of Android: Languages
Posted by David Winer, Product Manager
This blog post is part of a weekly series for #11WeeksOfAndroid. Each week weâre diving into a key area of Android so you donât miss anything. This week, we spotlighted languages; hereâs a look at what you should know.
Modern Android development starts with outstanding language support. Together, Kotlin, the Java programming language, and C++ form the foundation for Androidâs APIs and the tools you use every day for app development. This week we dove into all of the latest news across Androidâs three core languages: from Kotlin coroutines to Android 11âs new Java APIs to better tools for native development, thereâs a lot packed into the latest release.
youtube
Kotlin and coroutines
Kotlin is at the core of Androidâs modern, opinionated APIs. We hear from Android developers around the world that they love Kotlin for how expressive it is, how it helps you write higher quality apps, and how easy it is to start using in your existing Java codebase. More than 70% of the top 1000 apps on the Play Store now use Kotlin, and SlashDataTM announced earlier this year that Kotlin has been the fastest growing language community in percentage terms over the past two years. With the Android 11 beta, we decided to further embrace Kotlin by officially recommending coroutines for asynchronous work on Android.
youtube
Coroutines make it easy to write, read, and understand async code. The coroutines library is stable and already has deep integration with many of the Jetpack libraries you may be using, including Room, LiveData, and WorkManager. If youâre new to coroutines, check out Android â€ïž Coroutines: How to Manage Async Tasks in Kotlin, the latest coroutines learning pathway, and our new coroutines developer guide.
Getting started with Kotlin
From Kotlin-first libraries in Android Jetpack to deep integration with the tools in Android Studio, Android is deeply committed to Kotlin â and thereâs never been a better time to start using it. Weâve heard from many of you, though, that convincing your team to adopt Kotlin is not always easy. Even though Kotlin is 100% interoperable with the Java programming language, your teammates might have concerns. Is it worth spending the time learning a new language? How should you prioritize Kotlin against our other product and technology priorities?
This week we released a new case study from the Google Home team to help answer some of these questions. Over the course of one year, the Google Home team moved all new feature development to Kotlin and found their null pointer exceptions dropped by 33% during the same period. This is consistent with what weâve heard from Android teams all over the world â from Duolingo to Zomato to Cash App â Kotlin is delivering value both in the form of productivity and higher app quality for teams large and small. For all our latest case studies and data on Kotlin, check out our new Kotlin case studies page.
youtube
For beginners, we announced the launch of our new Android Basics in Kotlin course. If you are just learning how to program, Android Basics teaches essential programming concepts like functions and variables and will take you from âHello Worldâ all the way up through building a whole collection of Android apps in Kotlin.
The Java programming language and C++
When we announced official support for Kotlin three years ago, we didnât forget about the large number of Java and C++ Android developers. In the Android 11 release, we sought to keep improving our support for both of these languages. With the Android 11 beta, we upgraded our Java library support with a number of new APIs from OpenJDK 9, 10, and 11. We also unveiled Java library desugaring in Android Studio 4.0, making it easy to use many of these newer Java APIs even on older Android devices â for those of you who have asked for java.time support on older devices, weâve heard you loud and clear, and itâs arrived. For all the latest information on how to make use of these newer APIs, check out Murat Yenerâs talk Support for newer Java APIs. With Android 11, we also updated the Android runtime to make app startup even faster with I/O prefetching.
youtube
The C++ developer experience continues to get better, too. Android 11 included updates across the native toolchain, including better tools for profile-guided optimization (PGO) and improvements to native dependency management in Android Studio 4.0.
Ever-improving toolchains
Finally, we continue to focus on improvements to the D8 and R8 compilers in Android Studio. Android Studio comes with built-in support for the R8 shrinker, which helps you keep your appâs memory footprint small, leading to higher installs and retention among your users. We also recently added support for shrinking Kotlin libraries and apps that use Kotlin reflection with R8. For more information, check out Mads Ager and Morten Krogh-Jespersenâs latest Medium post.
Resources
You can find the entire playlist of #11WeeksOfAndroid video content here, and learn more about each week here. Weâll continue to spotlight new areas each week, so keep an eye out and follow us on Twitter and YouTube. Thanks so much for letting us be a part of this experience with you!
11 Weeks of Android: Languages published first on https://phonetracking.tumblr.com/
0 notes
Link
Learn JavaScript the most popular language for Web Development â Includes ES6, React & NodeJS & +15 Complete Projects!
What youâll learn
Learn the latest JavaScript features such as Async JS, Fetch API, Async Await & more
Youâre going to learn how to consume REST APIâs with JavaScript
How to create JavaScript classes and OOP
Youâre going to learn more advanced topics such as Generators, Iterators, Maps, Sets, Promises & more
OOP JavaScript with Object Constructors, Classes & Prototypes
Asynchronous JavaScript with Callbacks, Promises & Async Await
Add Interaction to your websites
Requirements
A Text Editor, iâm using Visual Studio Code
A Browser, i recommend Google Chrome
Internet, videos can be watched only with internet or via Udemy App
If you know HTML, CSS and you want to start creating Interactive Website, JavaScript is the way to go, and youâre in the right course
Description
Learn Modern JavaScript & ECMAScript with this Course!
JavaScript Versions included in this Course:Â ES6, ES7, ES8 ===Â âModern JavaScriptâ;
Just Added a ReactJS Introduction By Building a Project and a NodeJS Introduction with Pug, Sequelize, Express & Bootstrap
The most complete JavaScript course on Udemy, learn by building Projects!
In this course youâre going to learn JavaScript, from the fundamentals to Intermediate and Advanced Topics such as Prototypes, Delegation, Classes, Ajax, Promises, Generators, OOP, Fetch API, Async Await, Async JS, Objects, how to consume REST APIâs and more!
Before we Jump into the projects, iâm going to explain the Fundamentals of JavaScript, so if you donât have any previous experience, youâre in the right course!
if you are unfamiliar with this topics, youâre in the right course because youâre going to learn all of this and BUILD AMAZING PROJECTS
The best way to learn something new in programming is by building projects, in this course weâre going to build several projects from beginner to advanced level.
Included projects in this course:
Save from Form into Local Storage
Simulate Email Sending App
Generate Names from a REST API
Cryptocurrencies rate from a REST API (more than 100 cryptocurrencies included)
Events in your city with EventBrite and REST API
Shopping Cart with Local Storage
Car Insurance Live Quotation
My Weekly Budget APP
Pet Appointment Manager with IndexedDB
Search Lyrics Online
PerfectCocktail â A Drink Recipes APP
More Projects are added every month, have an idea? send me a message!
HEREâS A LIST AND DESCRIPTION OF THE PROJECTS!
PROJECT: Save into local storage from HTML Form
In this project you will learn how to read the values from a HTML Form and Inputs, then the data is going to be saved into LocalStorage so even if you close the tab or reload the window the info is going to be there thanks to this amazing JavaScript feature.
PROJECT: Adding Courses into the Shopping Cart
This project will help you a lot to understand DOM Scripting and how to traverse in all the HTML of your website.
DOM Scripting is one of the most important topics when learning JavaScript, this project will help you a lot!
PROJECT: Simulate Email Sending with Form
Another really nice project, in this one iâm gonna show you how to validate a form, so every value should be filled before we simulate the sending of an email
Also we will show some nice graphics when the email is sent, this project is very similar to a project that any company will ask you to develop when you try to get a JavaScript job!
PROJECT: Car Insurance Quotation from a FORM
In this project you will learn how to do some math operations in JavaScript with a real world project!
Also, you will learn how to read different values from a Form, validate the form, do some operations and finally print the results
Another really nice project to continue learning JavaScript!
PROJECT: Weekly Budget APP
This is one of my favorite projects, you will enter a Budget for the week, and then you start adding expenses, once you pass 50%Â of the budget, the remaining budget will change the color to yellow, and once you reach the final 25%Â of the budget the content will change to Red.
PROJECT: Name Generator with AJAX & Rest API (Fetch API Included)
AJAX is a legacy technology, but as a JavaScript developer is something that you should learn
And learning whatâs and how to use a REST API is also another really important topic, REST API is how you get data from other servers or websites, something that any JavaScript developer must know
As i said before, Ajax is a legacy technology, the new one is Fetch, so iâm gonna show you how switch from AJAX to Fetch API in the upcoming chapters.
PROJECT: Cryptocurrencies Rates
This is also one of my favorite projects
We will use a REST API that displays more than 100 different Cryptocurrencies and we will display the latest rate
This is going to be another project that you can add into your JavaScript portfolio!
PROJECT: Display Events with the EventBrite API
For this chapter we will use the EventBrite API to display and fetch events in our website
Instead of adding the events manually to your site, you can consume this EventBrite API to display events in your site using JavaScript
PROJECT: PerfectCocktail â A Drinks Recipes APP
This is the most complete project in the course, we will consume a REST API with several different Endpoints
Also we will save the favorite recipes into Local Storage, one of the most advanced projects in the whole JavaScript Code
PROJECT: Lyrics Search Engine with Modules
In this project we will use the new JavaScript Modules that was added in the latest versions, also we will query a REST API!
IndexedDB â Building a Complete Project (Appointment Management)
In JavaScript you can also create a database, in this project im gonna show you how to create, read, save the records in the IndexedDB database !
BONUS!
Whatâs webpack and how to create a webpack project â 25 videos about webpack just added into the course, you will learn whatâs a bundle, how to install dependencies, integrate webpack with other tools such as NPM or Babel
All this projects are developed using different techniques:Â classes, prototypes, fetch api, ajax, async await, arrow functions, promises &Â more!
THE VIDEOS WITH THE MAIN PROJECTS ARE ENABLED TO WATCH FOR FREE!
Who this course is for:
If you want to Learn JavaScript without Frameworks
If you want to learn the latest ES6, ES7 & ES8 features this is the course for you
If youâre the kind of person who learn best by building projects this course is for you
If youâre new to programming thereâs a whole FUNDAMENTALS Chapter, also if youâre new to JavaScript
Created by Juan Pablo De la torre Valdez Last updated 1/2019 English English [Auto-generated]
Size: 7.79 GB
  Download Now
https://ift.tt/2u8ORD0.
The post Modern JavaScript The Complete Course â Build +15 Projects appeared first on Free Course Lab.
0 notes
Text
6 Tips for How to Build an Online College Degree from Scratch #DLNchat
Last week the #DLNchat community gathered for a thought experiment around this question: If you could design an online college degree from scratch, how would you do it? Faculty, instructional designers, administrators and entrepreneurs shared their thoughtsâfrom first steps to long-term sustainability. The discussion is outlined below but itâs not too late to share your own ideas, just tweet them with the hashtag #DLNchat.
1. First step: Define & design for your learner
Erin Crisp, executive director of of strategic program launch at Indiana Wesleyan University, kicked things off with this thought: âthe first step for online college degrees is to define your learner. For whom are you designing?â Crisp continued, âI would design for today's working adult who hasn't had opportunity to keep up with the pace of technological change. Embed tech skills and certifications in programs targeting broader education goals.â Richard Price, research associate at Clayton Christensen Institute, shared similar ideas. âIn addition to offering theoretically rigorous, research-oriented courses, also offering a few highly job-oriented courses as well,â he tweeted.
#dlnchat I would design for today's working adult who hasn't had opportunity to keep up with the pace of technological change. Embed tech skills and certifications in programs targeting broader ed goals.
â ecrisp (@ecrisp) November 13, 2018
The design of a program should also be adaptable to the diversity of students who may enroll. As Crisp said, âNew degree programs should honor the knowledge and skill students bring to the table by eliminating lectures over content that is repetitive from other courses or life experiences.â
In addition to offering theoretically rigorous, research-oriented courses, also offering a few highly job-oriented courses as well. As opposed to getting a puzzled look from faculty and a reply that "we don't offer vocational courses..." #DLNchat
â Richard Price (@rmp289) November 13, 2018
2. Build on open content
Instructional designer Rayane Fayed shared a simple, strong recommendation: âBuild content based on existing open educational resources.â This approach improves access and learning as well when students play a role in the design of content, said some of the chat participants. As Robert Weisser recommended: âBuilding open educational resources into the curriculum and giving students more opportunities to access them, evaluate them as part of class discussion, and improve them if possible.â
A1 build content based on existing open educational resources #olo #DLNChat
â Rayane Fayed (@rfayed1) November 13, 2018
Weisser recommends a studious approach for involving learners in the content-creation process. âThere are ways students can improve sources but only after long consideration and discussion and giving of proofs. Works best maybe with students with real-world expertise that they can add to source,â he tweeted.
3. Focus on how (not how much) to blend & synchronize
Should tomorrowâs degrees move entirely online, or blend in-person learning with an online environment? And how much learning should occur synchronously or asynchronously? #DLNchat-ters had a variety of opinions. Fayed suggested a specific ratio (70 percent online, 30 percent face-to-face). She also tweeted, âSynchronous vs. asynchronous would be based on each learning outcome.â Similarly, Price recommended a percentage of synchronous learning (20 to 30 percent), but argued that 100 percent of effective learning can occur online. Several other chatters also promoted moving all learning online. âI agree that 100 percent online can be effective when video and synchronous sessions are thoughtfully employed,â Crisp argued.
Other chatters, like instructional designer Audra White, advocated for more of a mix. âIn my experience, blended is best. Students get the best of both worlds where they can engage the instructor and other students but still have the flexibility of online work,â said White. Ed Garay shared, âWhat mix of online or face-to-face really depends on a number of factors: target audience, type of program and curriculum, faculty involved, instructional design support available, effectiveness of one course delivery modality over another, etc.â
#DLNchat - What mix of online or face-to-face really depend on the number of factors: target audience, type of program and curriculum, faculty involved, instructional design support available, effectiveness of one course delivery modality over another, etc.
â Ed Garay (@garay) November 13, 2018
4. Mobilize everything
For #DLNchat-ters, the future of learning is mobile. EdSurgeâs Aneesa Davenport shared, âNow that I'm a mom, I'm 100 percent on the mobile-first bandwagon.â The #DLNchat community concurred. As Gonzalez said, âMobile compatibility is a must. People deserve to choose when, where and how to study.â Garay put it this way, âQuality mobile-first eLearning program delivery is, today, a requirement. eTextbooks, multimedia learning objects, OER, all class materials, organic (social) class communications, discussion, collaborative learning assignmentsâeverything must be mobile-perfect.â That includes student services. Crisp reminded the group, âIf they're mobile-learners, they also expect to be able to register, pay, and get help using mobile too.â
A3: mobile compatibility is a must. People deserve to choose when, where and how to study. Mobile Technology allows that #DLNchat
â Ivonne Gonzalez (@ivonneg948) November 13, 2018
5. Humanize student support
We asked #DLNchat participants how their new program would strive for better student retention and completion. Gonzalez recommended two key strategies: âWell trained online tutors and high quality and continuous participant follow-up. Here again technology is very helpful. AI helps keeping track of studentsâ performance, background, predictive analytics.â Others agreed that technology can best support retention efforts to identify when human intervention is useful.
Crisp was succinct. âRelationships,â she said. âIt helps if itâs with faculty but it doesn't have to be. Build program strategy that forms human connections among learners and between learners and instructors. Have an app for the program, not the school, that keeps students connected after graduation.â Quinn also recommended keeping post-program development in mind. âPartner in learner success, develop them as people, not just as practitioners,â he tweeted.
A5) I have three pillars: killer learning experience, partner in learner success, develop them as people, not just as practitioners. Use data to identify problems and intervene. Build in meta-learning/21C. #DLNchat https://t.co/3VxhqHAagj
â Clark Quinn (@Quinnovator) November 13, 2018
6. Accessibility will bring sustainability
When asked about the long-term sustainability of online programs, there was one theme that emerged above all others: accessibility. #DLNchat partner Educause said, âUniversal design for learning and digital accessibility both seek to increase learning access and reduce barriers for students.â Garay agreed but added a few more recommendations to consider for sustainability. âDesigning accessible, attractive and sustainable online learning programs is no longer difficult: you need to chunk it, make it mobile-perfect, develop effective active learning student activities, and create high-end class content that does not require much updating,â he tweeted.
It takes a village
Garay might make it sound simple, but as Yin Wah Kreher reminded participants âIt takes a whole village to create an effective online program and course.â
Get yours together with these tips to build your online college degree program from scratch.
It takes a whole village to create an effective online program and course. So if indiv depts don't have the resources, they do have to work with other units. Or some outsource media dev to other university centers. #DLNchat
â Yin Wah Kreher (@yinbk) November 13, 2018
Got questions for the #DLNchat community? Or want to share your ideas for a building an online program? Tweet our community with the hashtag #DLNchat! You can also RSVP for our next chat: How Can Higher Education Build a Lasting Culture of Innovation? on Tuesday, December 11 at 1pm PT/ 4pm ET. For more topics, check out our summaries of past chats. #DLNchat is co-hosted by the Online Learning Consortium, WCET, Tyton Partners and EDUCAUSE.
#DLNchat: How Can Higher Education Build a Lasting Culture of Innovation? 6 Tips for How to Build an Online College Degree from Scratch #DLNchat published first on https://medium.com/@GetNewDLBusiness
0 notes