投稿時間:2023-03-21 00:16:11 RSSフィード2023-03-21 00:00 分まとめ(21件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
AWS AWS Government, Education, and Nonprofits Blog 4 steps to build a data strategy for managing performance in the public sector https://aws.amazon.com/blogs/publicsector/4-steps-build-data-strategy-managing-performance-public-sector/ steps to build a data strategy for managing performance in the public sectorIn the public sector civic leaders must make sure that a wide variety of citizen services are delivered efficiently responsibly and successfully To identify high performing operations and support those in need of improvement decision makers need real time data in formats that are simple to interpret and understand In my years of experience serving the public sector I ve found that there are four foundational considerations for implementing a comprehensive public sector data analytics and performance management strategy 2023-03-20 14:08:31
python Pythonタグが付けられた新着投稿 - Qiita Pulumiを試してみた https://qiita.com/orc_jj/items/efbb8ad75f51bb760807 pulumi 2023-03-20 23:38:38
python Pythonタグが付けられた新着投稿 - Qiita Python 機械学習を用いてアニメのレコメンド機能の作成 https://qiita.com/nd06220221chuki/items/6979582f9ec3d6a78f45 機械学習 2023-03-20 23:20:32
Azure Azureタグが付けられた新着投稿 - Qiita Pulumiを試してみた https://qiita.com/orc_jj/items/efbb8ad75f51bb760807 pulumi 2023-03-20 23:38:38
Ruby Railsタグが付けられた新着投稿 - Qiita GitHubに草を生やす https://qiita.com/ayamo/items/44a8f22445a298bd36af github 2023-03-20 23:58:30
海外TECH MakeUseOf 4 Ways to Find a Program's Install Location on Windows https://www.makeuseof.com/windows-ways-to-find-programs-install-location/ fortunately 2023-03-20 14:15:17
海外TECH MakeUseOf How to Set Photo Upload Quality on WhatsApp https://www.makeuseof.com/whatsapp-photo-upload-quality-setting/ resolution 2023-03-20 14:05:17
海外TECH MakeUseOf 10 Twitter Hashtags That Shaped History https://www.makeuseof.com/twitter-hashtags-that-shaped-history/ media 2023-03-20 14:05:17
海外TECH MakeUseOf Working With Third-Party Packages in Rust With Cargo and Crates https://www.makeuseof.com/cargo-and-crates-with-third-party-packages-in-rust/ cargo 2023-03-20 14:01:16
海外TECH MakeUseOf What Is the MrBeast Giveaway Pop-Up Scam? How to Avoid It https://www.makeuseof.com/mr-beast-giveaway-pop-up-scam/ youtuber 2023-03-20 14:01:16
海外TECH DEV Community Make Sure You Do This Before Switching To Signals https://dev.to/angular/make-sure-you-do-this-before-switching-to-signals-27m9 Make Sure You Do This Before Switching To SignalsThis time last year Standalone Component s were the talk of the Angular town This year signals have replaced that buzz throughout the Angular Ecosystem Though it will take some time for the introduction of signals into Angular s ecosystem to take hold it is important for us to begin thinking about how these changes may or may not affect our applications In fact I am proposing one thing that everyone should do before switching to signals But before I get to that let s first learn what signals are What Are Signals Anyways For those interested in learning more you can view this PR from the Angular team that introduces signals into Angular For some historical context Signals are not a new concept In fact they are the backbone of reactivity in SolidJS The SolidJS documentation describes Signals as the following They contain values that change over time when you change a signal s value it automatically updates anything that uses it Ok but how are Signals different that what we currently have in Angular The simple answer for many is that they aren t much different from a practical standpoint But if we dig a little deeper we will find that Signals solve a long standing performance and architectural problem Angular has with it s current Change Detection mechanism That mechanism is a library known as Zone Js Though it works today it has some pretty significant performance issues in larger applications that have a lot of changing state By switching to Signals we can slowly remove the parts of our applications that depend upon Zone js and replace them with Signals This will in effect improve the overall performance across our applications Ok but what about RxJs RxJs is a huge part of the Angular Ecosystem It is used for handling streams of asynchronous data in our applications Thankfully RxJs isn t going anywhere Signals however are being introduced to handle any and all synchronous state changes in our Angular applications I like to think of it as a replacement for any non RxJs state In Short Async RxJsSync Signals The ProblemNow that we know a little bit more about Signals and what problems they solve let s talk about the one thing you should do before switching to them Let s first look at the problem by looking at a simple example Signals affect our Application s state which in most cases is the most difficult and complex part of our applications In fact we want to be REALLY certain that any changes we make aren t causing regression The best way to assure against this is through automated testing More specifically UI tests However many unit tests written for Angular Components using Karma will break in the process of switching to Signals This is because they are often times coupled to the implementation of the Component itself Let me show you can example below of a simple Standalone CounterComponent import AsyncPipe from angular common import Component from angular core import BehaviorSubject from rxjs Component standalone true imports AsyncPipe template lt h id count gt Count count async lt h gt lt div gt lt button id decrement click decrement gt lt button gt lt button id increment click increment gt lt button gt lt div gt export class CounterComponent private count private readonly count new BehaviorSubject count this count asObservable increment void this count this count next this count decrement void this count this count next this count A typical Karma Unit Test for this component would look like the following import ComponentFixture TestBed from angular core testing import CounterComponent from counter component describe CounterComponent gt let component CounterComponent let fixture ComponentFixture lt CounterComponent gt beforeEach async gt imports CounterComponent compileComponents fixture TestBed createComponent CounterComponent component fixture componentInstance fixture detectChanges it should create gt expect component toBeTruthy it can increment the count gt const compiled fixture nativeElement as HTMLElement const count compiled querySelector count expect count textContent toContain const button fixture debugElement nativeElement querySelector increment button click fixture detectChanges expect count textContent toContain it can decrement the count gt const compiled fixture nativeElement as HTMLElement const count compiled querySelector count expect count textContent toContain const button fixture debugElement nativeElement querySelector decrement button click fixture detectChanges expect count textContent toContain Now we can run our test to validate it works by running ng test watchWe should now seeing the following output Now we can go ahead and refactor our component to use Signals import Component signal from angular core Component standalone true template lt h id count gt Count count lt h gt lt div gt lt button id decrement click decrement gt lt button gt lt button id increment click increment gt lt button gt lt div gt export class CounterComponent count signal increment void this count update c gt c c decrement void this count update c gt c c Now if we return to our test we will continue to see the following output Though this example works it isn t always this trivial Let s revert those changes we just made and I will show you more complex unit tests that will eventually fail after switching to signals describe CounterComponent gt let component CounterComponent let fixture ComponentFixture lt CounterComponent gt beforeEach async gt imports CounterComponent compileComponents fixture TestBed createComponent CounterComponent component fixture componentInstance fixture detectChanges it increments count when calling increment gt component increment component count pipe take subscribe value gt expect value toEqual it decrements count when calling decrement gt component decrement component count pipe take subscribe value gt expect value toEqual If we return to our RxJs implementation and run our tests we just wrote we will see successful tests passing But if we refactor our CounterComponent to use signals again we will now see the following error in our Code Editor As you can see most tests that test the logic in our Component s class directly will inevitably fail after refactoring to signals To avoid this issue and improve the overall developer experience and quality of our tests let s add Cypress Component Tests Getting Started With Component TestingIf you haven t already done so let s add Component Testing to our application npm i cypress DNow we can launch Cypress and click on Component Testing npx cypress openNow you can simply follow Cypress s Configuration Wizard to setup Component Testing in your application if you haven t already done so You can follow my video below for a more detailed guide to getting started with Angular Component Testing Writing Cypress Component TestsNow that we have Cypress Component Testing configured let s create a Cypress Component test for the CounterComponent import CounterComponent from counter component describe CounterComponent gt it can mount and display an initial value of gt cy mount CounterComponent cy get count contains it can increment the count gt cy mount CounterComponent cy get increment click cy get count contains it can decrement the count gt cy mount CounterComponent cy get decrement click cy get count contains Now we can run the counter component cy ts spec and we should get the following Now let s go ahead and re run our tests using the signals implementation and we will see the same result Not only were the Cypress tests significantly easier to write they also provide additional value that our Karma test runner did not We are now able to interact with our component in our test runner itself and verify it s output as opposed to a tiny green dot You can find this example repo at ConclusionTLDR Angular is on Signals Standalone SSR and so much more Though the impacts of Signals is yet to be known as of this writing I think that the safest way forward is to use high quality UI tests Admittedly I am biased but I believe that Cypress Component Tests are the best tool for this job They are simpler to write and they encourage you to write the UI tests we talked about in this article In the end which tool you use is up to you and your team The most important thing is that you feel confident that the side effects caused by refactoring to signals are caught before your users do 2023-03-20 14:39:44
海外TECH DEV Community Benchmarking the AWS SDK https://dev.to/aws-builders/benchmarking-the-aws-sdk-2pd4 Benchmarking the AWS SDKIf you re building Serverless applications on AWS you will likely use the AWS SDK to interact with some other service You may be using DynamoDB to store data or publishing events to SNS SQS or EventBridge Today the NodeJS runtime for AWS Lambda is at a bit of a crossroads Like all available Lambda runtimes NodeJS includes the aws sdk in the base image for each supported version of Node This means Lambda users don t need to manually bundle the commonly used dependency into their applications This reduces the deployment package size which is key for Lambda Functions packaged as zip files can be a maximum of mb including code layers and container based functions support up to GB image sizes The decision about which SDK you use and how you use it in your function seems simple at first but it s actually a complex multidimensional engineering decision In the Node runtime Node x x and x each contain the AWS SDK v packaged in the runtime This means virtually all Lambda functions up until recently have been built to use the v SDK When AWS launched the Node x runtime for Lambda they packaged the AWS SDK v by default Since the AWS SDK is likely the most commonly used library in Lambda I decided to break down the cold start performance of each version across a couple of dimensions We ll trace the cold start and measure the time to load the SDK via the following configurations from the runtime The entire v SDKOne v SDK clientOne v SDK clientThen we ll use esbuild to tree shake and minify each client and run the tests again Tree shaken v SDKOne tree shaken v SDK clientOne tree shaken v SDK clientEach of these tests were performed in my local AWS region using functions configured with mb of RAM The client I selected was SNS I ran each test times and screengrabbed one Limitations are noted at the end Loading the entire v SDKThere are a few common ways to use the v SDK In most blogs and documentation including AWS s own but not always you ll find something like this const AWS require aws sdk const snsClient new AWS SNS some handler codeAlthough functional this code is suboptimal as it loads the entire AWS SDK into memory Let s take a look at that flamegraph for the cold start trace In this case we can see that this function loaded the entire aws sdk in ms Check out all of this extra stuff that we re loading Here we see that we re loading not only SNS but also a smattering of every other client in the clients directory like DynamoDB S Kinesis Sagemaker and so many small files that I don t even trace them in this cold start trace First run msSecond run msThird run ms Loading one v SDK clientLet s consider a more efficient approach We can instead simply pluck the SNS client or whichever client you please from the library itself const SNS require aws sdk clients sns const snsClient new SNS This should save us a fair amount of time check out the flame graph This is much nicer ms Since we re not loading clients we won t use that saves us around milliseconds First run msSecond run msThird Run ms AWS SDK vThe v SDK is entirely client based so we have to specify the SNS client specifically Here s what that looks like in code const SNSClient PublishBatchCommand require aws sdk client sns const snsClient new SNSClient This results in a pretty deep cold start trace We can see that the SNS client in v loaded in ms The Simple Token Service STS contributed ms of this time First run msSecond run msThird run ms Bundled JS benchmarksThe other option I want to highlight is packaging the project using something like Webpack or esbuild JS Bundlers transpile all of your separate files and classes along with all node modules into one single file a practice originally developed to reduce package size for frontend applications This helps improve the cold start time in Lambda as unimported files can be pruned and the entire handler becomes one file AWS SDK v minified in its entiretyNow we ll load the entire AWS SDK v again this time using esbuild to transpile the handler and SDK v const AWS require aws sdk const snsClient new AWS SNS some handler code And here s the cold start trace You ll note that now we only have one span tracing the handler as the entire SDK is now included in the same output file but the interesting thing is that the load time is almost ms First run msSecond run msThird run ms Why is this so much slower than the non bundled version Handler contributed cold start duration is primarily driven by syscalls used by the runtime NodeJS to open files eg fs readSync The handler file is now mb uncompressed and Node has to load it entirely Additionally I suspect that AWS can separately cache the built in sdk with better locality on each worker node than your individual handler package which must be fetched after a Lambda Worker is assigned to run your function Minified v SDK loading only the SNS clientOnce again we re importing only the SNS client but this time we ve minified it so the code is the same const SNS require aws sdk clients sns const snsClient new SNS You can see in the cold start trace that the SDK is no longer being loaded from the runtime rather it s all part of the handler ms is much better than the entire minified SDK from the previous test Here are all three runs First run msSecond run msThird run ms Minified v SDKNext let s look at a minified project using the SNS client from the v SDK const SNSClient PublishBatchCommand require aws sdk client sns const snsClient new SNSClient Here s the flamegraph Far better now ms After repeating this test a few times I saw that ms tended towards the high end and measured some as low as ms No surprise that this will vary a bit see the caveats but I thought it was interesting that we got around the same performance as the minified v sns client code First run ms Second run msThird run msI also find it fun to see the core modules which are provided by Node Core are also traced ScoringHere s the list of fastest to slowest packaging strategies for the AWS SDK ConfigResultesbuild individual v SNS clientmsesbuild individual v SNS clientmsv SNS client from the runtimemsv SNS client from the runtimemsEntire v client from the runtimemsesbuild entire v SDKms Caveats etcMeasuring the cold start time of a Lambda function and drawing concrete conclusions at the millisecond level is a bit of a perilous task Deep below a running Lambda function lives an actual server whose load factor is totally unknowable to us as users There could be an issue with noisy reighbors where other Lambda functions are stealing too many resources The host could have failing hardware older components etc It could be networked via an overtaxed switch or subnet or simply have a bug somewhere in the millions of lines of code needed to run a Lambda function TakeawaysMost importantly users should know how long their function takes to initialize and understand specifically which modules are contributing to that duration As the old adage goes You can t fix what you can t measure Based on this experiment I can offer a few key takeaways Load only the code you need Consider adding a lint rule to disallow loading the entire v sdk Small focused Lambda functions will experience less painful cold starts If your application has a number of dependencies consider breaking it up across several functions Bundling can be worthwhile but may not always make sense For me this means using the runtime bundled SDK and import clients directly For you that might be different As far as the Node x runtime and v SDK AWS has already said they re aware of this issue and working on it I ll happily re run this test when there s a notable change in the performance Keep in mind the AWS SDK is only one dependency Most applications have several or even dozens of dependencies in each function Optimizing the AWS SDK may not have a large impact on your service which brings me to my final point Try this on your own functionsI traced these functions using a feature I built for Datadog called Cold Start Tracing it s available now for Python and Node and I d encourage you to try this yourself with your own functions Wrapping upYou can find more of my thoughts on my blog and on twitter 2023-03-20 14:32:30
Apple AppleInsider - Frontpage News The BBC is advising staff to remove TikTok from work phones https://appleinsider.com/articles/23/03/20/the-bbc-is-advising-staff-to-remove-tiktok-from-work-phones?utm_medium=rss The BBC is advising staff to remove TikTok from work phonesThough the BBC still has a TikTok channel it is advising staff to delete the app from their work phones over China fears TikTokAs a TikTok ban edges closer in the US the UK s British Broadcasting Corporation BBC seeks to remove it from corporate devices over features of Chinese surveillance However the app is still permitted on personal devices Read more 2023-03-20 14:45:21
Apple AppleInsider - Frontpage News Belkin's Matter woes, ESR Find My wallet, & more smart home news https://appleinsider.com/articles/23/03/20/belkins-matter-woes-esr-find-my-wallet-more-smart-home-news?utm_medium=rss Belkin x s Matter woes ESR Find My wallet amp more smart home newsBelkin is stepping back from the Matter standard ESR got a new Find My enabled Geo Wallet Stand and there is much more news on the Homekit Insider podcast HomeKit InsiderAfter previously committing to Matter Belkin is now putting its rollout on hold It has decided to reevaluate the standard as it looks for better ways to differentiate itself from others in the market ーand that might not be a bad thing either Read more 2023-03-20 14:19:43
海外TECH Engadget Apple's 3rd-gen AirPods are back on sale for $150 https://www.engadget.com/apples-3rd-gen-airpods-are-back-on-sale-for-150-141513741.html?src=rss Apple x s rd gen AirPods are back on sale for This is a good moment to snag Apple s wireless earbuds for your springtime excursions Amazon is once again selling the third generation AirPods for That s near the all time low price and could make them a safe choice if you re looking for easy to use buds for casual listening and calls Just be prepared to wait a little while As of this writing Amazon is estimating delivery in roughly three weeks The third gen AirPods are clearly Apple s best default wireless earbuds to date As we noted in our review they sound much better than their predecessors while delivering extra battery life and a comfier fit Toss in spatial audio support and they re a reliable pick if you re an iPhone owner and want no nonsense audio for your daily commute They integrate well with the Apple ecosystem and you may even prefer them over higher end options if you want to hear some of the outside world They re not as ideal if you re an Android user of course More importantly though you may want to consider Apple s second generation AirPods Pro ーthey re currently on sale for and worth the extra outlay if you want active noise cancellation a more secure fit or gym friendly water resistance With that said there s no need to pay for more than the base AirPods if you re listening to podcasts or otherwise aren t fussy about sound Follow EngadgetDeals on Twitter and subscribe to the Engadget Deals newsletter for the latest tech deals and buying advice This article originally appeared on Engadget at 2023-03-20 14:15:13
金融 RSS FILE - 日本証券業協会 全国上場会社のエクイティファイナンスの状況 https://www.jsda.or.jp/shiryoshitsu/toukei/finance/index.html 上場会社 2023-03-20 15:30:00
金融 RSS FILE - 日本証券業協会 J-IRISS https://www.jsda.or.jp/anshin/j-iriss/index.html iriss 2023-03-20 14:41:00
ニュース BBC News - Home RMT members at Network Rail vote to accept pay deal https://www.bbc.co.uk/news/business-65015207?at_medium=RSS&at_campaign=KARANGA dealrail 2023-03-20 14:17:48
ニュース BBC News - Home Rupert Murdoch set to marry for fifth time at 92 https://www.bbc.co.uk/news/65012754?at_medium=RSS&at_campaign=KARANGA lesley 2023-03-20 14:14:40
ニュース BBC News - Home Why asylum seekers are choosing Canada in record numbers https://www.bbc.co.uk/news/world-us-canada-64825197?at_medium=RSS&at_campaign=KARANGA asylum 2023-03-20 14:55:28
仮想通貨 BITPRESS(ビットプレス) [日経XTECH] ビットコイン巡る前金融庁長官の「伝説のスピーチ」、2年半後に答え合わせをしてみる https://bitpress.jp/count2/3_9_13580 xtech 2023-03-20 23:55:39

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)